PHP版本:5.3.10
系统版本: Centos 6.0
PHP5.3.10自5.3.8之后就不用单装php-fpm,已经整合到一起了。
下载地址
yum install ld*
yum install libtool-ltdl.x86_64 libtool.x86_64 libjpeg*
ln -s /usr/lib64/mysql/libmysqlclient.so /usr/lib/
编译参数:./configure \
--prefix=/home/lankun/programs/php \
--with-config-file-path=/home/lankun/programs/php/etc \
--with-openssl \
--enable-fpm \
--with-curl \
--with-iconv-dir=/usr/local \
--enable-sockets \
--enable-mbstring \
--with-zlib \
--with-gd \
--without-pear \
--with-jpeg-dir \
--with-png-dir \
--with-mysqli=/home/lankun/programs/mysql/bin/mysql_config \
--with-mysql=/home/lankun/programs/mysql
make && make install
cp php.ini-production /home/lankun/programs/php/lib/php.ini
vim /home/lankun/programs/php/lib/php.ini
short_open_tag = On
出现得错误如下:
错误一:
configure: error: xml2-config not found. Please check your libxml2 installation.
而我已经安装过了libxml2,但是还是有这个提示:
解决办法:
# sudo apt-get install libxml2-dev
错误二:
configure: error: Please reinstall the BZip2 distribution
而我也已经安装了bzip2,网上找到得解决方案都是需要安装bzip2-dev,可是11.10里面没有这个库。
解决办法:在网上找到bzip2-1.0.5.tar.gz,解压,直接make ,sudo make install.(我使用的该源来自于)
错误三:
configure: error: Please reinstall the libcurl distribution -easy.h should be in /include/curl/
解决办法:
# sudo apt-get install libcurl4-gnutls-dev
错误四:
configure: error: jpeglib.h not found.
解决办法:
# sudo apt-get install libjpeg-dev
错误五:
configure: error: png.h not found.
解决办法:
# sudo apt-get install libpng-dev
错误六:
configure: error: libXpm.(a|so) not found.
解决办法:
# sudo apt-get install libxpm-dev
错误七:
configure: error: freetype.h not found.
解决办法:
# sudo apt-get install libfreetype6-dev libxpm-dev
错误八:
configure: error: Your t1lib distribution is not installed correctly. Please reinstall it.
解决办法:
# sudo apt-get install libt1-dev
错误九:
configure: error: mcrypt.h not found. Please reinstall libmcrypt.
解决办法:
# sudo apt-get install libmcrypt-dev
错误十:
configure: error: Cannot find MySQL header files under yes.
Note that the MySQL client library is not bundled anymore!
解决办法:
# sudo apt-get install libmysql++-dev libmysql*
错误十一:
configure: error: xslt-config not found. Please reinstall the libxslt >= 1.1.0 distribution
解决办法:
# sudo apt-get install libxslt1-dev
如果报libmysqlclient错误:
ln -s /usr/lib64/mysql/libmysqlclient.so /usr/lib/
这里的jpeg支持需要yum install libjpeg安装
--with-jpeg-dir=/usr/local/lib/
如果报iconv的错误可以编译参数中加入
ZEND_EXTRA_LIBS='-liconv'
如果报PHP_Archive错误在编译参数中加入
--without-pear
阅读(2173) | 评论(0) | 转发(0) |