解决PHP安装configure报错:WARNING: This bison version is not supported for regeneration of the Zend/PHP par

当采用源码安装PHP时,
在解包之后,当我们执行.configure 命令时,

tar xf php-5.6.30.tar.gz -C /usr/src/
cd /usr/src/php-5.6.30/
sudo ./configure --prefix=/usr/local/php --with-config-file-path=/usr/local/php/etc --with-bz2 --with-curl --enable-sockets --disable-ipv6 --with-gd --with-jpeg-dir=/usr/local --with-png-dir=/usr/local --with-freetype-dir=/usr/local --enable-gd-native-ttf --with-iconv-dir=/usr/local --enable-mbstring --enable-calendar --with-gettext --with-libxml-dir=/usr/local --with-zlib --with-pdo-mysql=/usr/src/php-5.6.30/ext/mysqlnd --with-mysqli=/usr/src/php-5.6.30/ext/mysqlnd --with-mysql=/usr/src/php-5.6.30/ext/mysqlnd --enable-dom --enable-xml --enable-fpm --with-libdir=lib64 --enable-bcmath

报错如下:
在这里插入图片描述
报错原因:表示当前bison版本不支持PHP,版本不适配
查看当前系统bison版本:

bison --version

在这里插入图片描述
bison版本为:3.0.4,与PHP不适配

bison版本与PHP适配版本如下:

PHP 5.4: 1.28, 1.35, 1.75, 1.875, 2.0, 2.1, 2.2, 2.3, 2.4, 2.4.1, 2.4.2, 2.4.3, 2.5, 2.5.1, 2.6, 2.6.1, 2.6.2, 2.6.4
PHP 5.5: 2.4, 2.4.1, 2.4.2, 2.4.3, 2.5, 2.5.1, 2.6, 2.6.1, 2.6.2, 2.6.3, 2.6.4, 2.6.5, 2.7
PHP 5.6: 2.4 or later, excluding 3.0 only (3.0.1 and later are OK)
PHP 7.0: 2.4 or later

解决方案:当前安装PHP版本为5.60,所以bison2.4版本即可适配

wget http://ftp.gnu.org/gnu/bison/bison-2.4.1.tar.gz
tar -zxvf bison-2.4.1.tar.gz
cd bison-2.4.1/
./configure
make
make install
  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值