mac编译php7异常

mac编译php7异常

./configure --enable-debug

异常

checking for bison... bison
checking for bison version... 3.5.4 (ok)
checking for re2c... no
configure: error: re2c 0.13.4 is required to generate PHP lexers.

下载

wget https://github.com/skvadrik/re2c/releases/download/1.0.2/re2c-1.0.2.tar.gz

编译安装

tar -zxvf re2c-1.0.2.tar.gz
cd ./re2c-1.0.2
./configure && make && make install

异常

checking for libxml-2.0 >= 2.7.6... no
configure: error: in `/Users/easyboom/CODE/php-src':
configure: error: The pkg-config script could not be found or is too old.  Make sure it

需要升级libxml

ftp://xmlsoft.org/libxml2/
tar zxvf libxml2-2.9.9.tar.gz
cd libxml2-2.9.9
./configure --prefix=/usr/local/libxml2
make && make install

你可能感兴趣的:(php)