先别说我落后,是阿里云服务器推荐这个配置,所以就安装5.4.31这个版本了
./configure --prefix=/usr/local/php --with-mysql=/usr/local/mysql/ --with-config-file-path=/usr/local/php/ --with-mysqli=/usr/local/mysql/bin/mysql_config --with-iconv-dir=/usr/local --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib --with-libxml-dir=/usr --enable-xml --enable-safe-mode --enable-ftp --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --with-curl --with-curlwrappers --enable-mbregex --enable-fpm --enable-mbstring --with-mcrypt=/usr/local/libmcrytp --with-gd --enable-gd-native-ttf --with-openssl --with-mhash --enable-pcntl --enable-sockets --with-xmlrpc --enable-zip --enable-soap
v /usr/local/mysql/include /usr/include/mysqlrror1
configure: error: xml2-config not found. Please check your libxml2 installation.
solution:
重新安装libxml2和libxml2-devel包
yum install libxml2
yum install libxml2-devel -y
error2
configure: error: jpeglib.h not found.
solution:
yum install libjpeg.x86_64 libpng.x86_64 freetype.x86_64 libjpeg-devel.x86_64
libpng-devel.x86_64 freetype-devel.x86_64 -y
1,0-1 Top
configure: error: Cannot find OpenSSL's <evp.h>
a. yum list openssl 如果没有安装之 yum install openssl
b. yum list openssl-devel 如果没有安装之 yum install openssl-devel
configure: error: Please reinstall the libcurl distribution -
easy.h should be in <curl-dir>/include/curl/
# yum -y install curl-devel
configure: error: mcrypt.h not found. Please reinstall libmcrypt.
wget
ftp://mcrypt.hellug.gr/pub/crypto/mcrypt/attic/libmcrypt/libmcrypt-2.5.7.tar.gz
66 tar -zxvf libmcrypt-2.5.7.tar.gz
67 cd libmcrypt-2.5.7
68 mkdir -p /usr/local/libmcrytp
69 ./configure prefix=/usr/local/libmcrytp/
70 make
71 make install
--with-mcrypt=/usr/local/libmcrytp
configure: error: Cannot find MySQL header files under
/usr/local/mysql --with-config-file-path=/usr/local/php/ --with-mysqli=/usr/local/mysql/bin/mysql_config.
Note that the MySQL client library is not bundled anymore!
yum -y install mysql-devel