Home  >  Article  >  Web Front-end  >  How to deal with Mac installation thrift error due to bison

How to deal with Mac installation thrift error due to bison

php中世界最好的语言
php中世界最好的语言Original
2018-05-29 10:18:432465browse

This time I will bring you how to deal with MacInstallationthrift error due to bison, handle Mac installation thrift error due to bisonWhat are the precautionsThe following is a practical case, let's come together take a look.

When installing thrift, an error message is reported:

##Bison version 2.5 or higher must be installed on the system!

Use brew install bison to install the new version of 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)

Already installed version 3.0.4

But when installing thrift, an error is still reported

Bison version 2.5 or higher must be installed on the system!

After checking, the bison that comes with xcode is used, the path is

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/

Solution:

First rename bison

cd /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/
sudo mv bison bison111
Then copy the new version of bison to the path

sudo cp /usr/local/Cellar/bison/3.0.4/bin/bison /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/
Install thrift again, Successful installation.

cd /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/
sudo rm bison
sudo mv bison111 bison
I believe you have mastered the method after reading the case in this article. For more exciting information, please pay attention to other related articles on the php Chinese website!

Recommended reading:

How to use AngularJS to implement base64 encoding and decoding

How to use ES6 template strings

The above is the detailed content of How to deal with Mac installation thrift error due to bison. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn