錯誤1
configure: error: xml2-config not found. please check your libxml2 installation.
解決方案
yum install -y libxml2-devel
錯誤2
configure: error: cannot find openssl's
解決方案
yum install -y openssl openssl-devel
錯誤3
checking for bzip2 in
default path... not found
configure: error: please reinstall the bzip2 distribution
解決方案
yum install -y bzip2 bzip2-devel
錯誤4
configure: error: png.h not found.
解決方案
yum install -y libpng libpng-devel
錯誤5
configure: error: freetype.h not found.
解決方案
yum install -y freetype freetype-devel
錯誤6
configure: error: jpeglib.h not found.
解決方案
[root@localhost php-5.6.24]# yum install -y libjpeg-devel
錯誤7
configure: error: mcrypt.h not found. please reinstall libmcrypt.
解決方案
cd /usr/local/src
wget
.gr/pub/crypto/mcrypt/attic/libmcrypt/libmcrypt-2.5
.7.tar
.gztar -zxvf libmcrypt-2.5
.7.tar
.gzcd libmcrypt-2.5
.7./configure --prefix=/usr/local
make
make install
重新配置編譯引數
[root@localhost php-5.6
.24]# ./configure \
> --prefix=/usr/local/php \
> --with-apxs2=/usr/local/apache2/bin/apxs \
> --with-config-file-path=/usr/local/php/etc \
> --with-mysql=/usr/local/mysql \
> --with-libxml-dir \
> --with-gd \
> --with-jpeg-dir \
> --with-png-dir \
> --with-freetype-dir \
> --with-iconv-dir \
> --with-zlib-dir \
> --with-bz2 \
> --with-openssl \
> --with-mcrypt \
> --enable-soap \
> --enable-gd-native-ttf \
> --enable-mbstring \
> --enable-sockets \
> --enable-exif \
> --disable-ipv6
[root@localhost php-5.6.24]# make
[root@localhost php-5.6.24]# echo $?
0
[root@localhost php-5.6.24]# make install
[root@localhost php-5.6.24]# echo $?
0
[root@localhost php-5.6.24]# ls /usr/local/php/
bin etc include lib php
模組
[root@localhost php-5.6.24]# /usr/local/php/bin/php –m
配置資訊
[root@localhost php-5.6.24]# /usr/local/php/bin/php –i
如果apache在執行,重啟apache
[root@localhost ~]# /usr/local/apache2/bin/apachectl restart
如果沒有執行apache,啟動apache
PHP 編譯安裝PHP
1.安裝php所有的依賴軟體包 root web01 yum install zlib devel libxml2 devel libjpeg devel freetype devel libpng devel gd devel libcurl devel libxslt devel openssl...
編譯安裝PHP
2 確保安裝之前有安裝gd,png,curl,xml等等lib開發庫。如果不確定,執行以下命令 yum install gcc make gd devel libjpeg devel libpng devel libxml2 devel bzip2 devel libcurl devel y 3 編...
編譯安裝PHP
編譯安裝php 安裝依賴 yum install gcc bison bison devel zlib devel libmcrypt devel mcrypt mhash devel openssl devel libxml2 devel libcurl devel bzip2 devel rea...