php编译安装

下载对应版本php, tar zxvf phpx.x.x.tar.gz

cd phpx.x.x

./configure --prefix=/usr/bin/php --enable-fpm  --with-mcrypt=/usr/local/libmcrypt --with-zlib --enable-mbstring --with-openssl --with-mysql --with-mysqli --with-mysql-sock --with-gd --with-jpeg-dir=/usr/lib --enable-gd-native-ttf  --enable-pdo --with-pdo-mysql --with-gettext --with-curl --with-pdo-mysql --enable-sockets --enable-bcmath --enable-xml --with-bz2 --enable-zip --enable-freetype


问题:

1.

configure: error: Please reinstall the BZip2 distribution

bzip2软件没有安装,安装后可解决:

yum install bzip2-devel.x86_64 -y

2.

configure: error: Cannot find MySQL header files under yes.

Note that the MySQL client library is not bundled anymore!

没有安装mysql

yum install mysql-devel

cp /usr/lib64/mysql/libmysqlclient.so /usr/lib/libmysqlclient.so


你可能感兴趣的:(php编译安装)