解决Mac安装thrift因bison报错的问题
安装thrift时,报错:
Bison version 2.5 or higher must be installed on the system!
使用brew install bison 安装新版的bison
$ brew list bison /usr/local/Cellar/bison/3.0.4/bin/bison /usr/local/Cellar/bison/3.0.4/bin/yacc /usr/local/Cellar/bison/3.0.4/lib/liby.a /usr/local/Cellar/bison/3.0.4/share/aclocal/bison-i18n.m4 /usr/local/Cellar/bison/3.0.4/share/bison/ (23 files) /usr/local/Cellar/bison/3.0.4/share/doc/ (14 files) /usr/local/Cellar/bison/3.0.4/share/info/bison.info /usr/local/Cellar/bison/3.0.4/share/man/ (2 files)
已经安装3.0.4版本
但是安装thrift,仍然报错
Bison version 2.5 or higher must be installed on the system!
经查是使用了xcode自带的bison,路径
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/
解决办法:
首先将bison改名
cd /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ sudo mv bison bison111
然后新版本的bison复制到路径下
sudo cp /usr/local/Cellar/bison/3.0.4/bin/bison /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/
再次安装thrift,安装成功。
cd /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ sudo rm bison sudo mv bison111 bison
相关推荐
Runtimeclass 2020-10-20
Martian 2020-10-13
jerry00 2020-06-11
infoscienceliu 2020-02-01
风之翊 2019-12-29
XiaoqiangNan 2020-01-08
jerry00 2020-01-08
Ggaomiss 2019-12-14
程序媛菜鸟 2019-11-19
jerry00 2019-11-19
lvwenyuan 2019-11-18
infoscienceliu 2019-11-17
hyclq 2015-05-17
XiaoqiangNan 2015-08-18
infoscienceliu 2019-11-09
Martian 2019-11-08
XiaoqiangNan 2019-11-04
AReallyMan 2019-07-13