重庆分公司,新征程启航

为企业提供网站建设、域名注册、服务器等服务

在Mac中安装thrift时出现bison报错如何解决

本篇文章为大家展示了在Mac中安装thrift时出现bison报错如何解决,内容简明扼要并且容易理解,绝对能使你眼前一亮,通过这篇文章的详细介绍希望你能有所收获。

创新互联建站专注为客户提供全方位的互联网综合服务,包含不限于网站制作、成都网站设计、安远网络推广、微信小程序开发、安远网络营销、安远企业策划、安远品牌公关、搜索引擎seo、人物专访、企业宣传片、企业代运营等,从售前售中售后,我们都将竭诚为您服务,您的肯定,是我们最大的嘉奖;创新互联建站为所有大学生创业者提供安远建站搭建服务,24小时服务热线:18980820575,官方网址:www.cdcxhl.com

安装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

上述内容就是在Mac中安装thrift时出现bison报错如何解决,你们学到知识或技能了吗?如果还想学到更多技能或者丰富自己的知识储备,欢迎关注创新互联行业资讯频道。


本文名称:在Mac中安装thrift时出现bison报错如何解决
文章网址:http://cqcxhl.cn/article/poiich.html

其他资讯

在线咨询
服务热线
服务热线:028-86922220
TOP