1. 程式人生 > >編譯安裝PHP 時遇到問題解決方法.

編譯安裝PHP 時遇到問題解決方法.

tro 沒有 stat xmlrpc 編譯安裝 錯誤 clas jpeg libiconv

編譯安裝PHP時出現下面的錯誤代碼:

error 2

checking for pkg-config... /usr/bin/pkg-config
configure: error: Cannot find OpenSSL‘s <evp.h>

根據錯誤提示,感覺好像是缺少了OpenSSL的安裝包,於是嘗試著安裝一下OpenSSL的安裝包。

 yum  install  openssl.x86_64 openssl-devel.x86_64 -y

  安裝完成後,在配置PHP的選項

cd php-5.5.32
./configure --prefix=/application/php-5.5.32 --with-mysql=/application/mysql/ --with-pdo-mysql=mysqlnd --with-iconv-dir=/usr/local/libiconv --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib --with-libxml-dir=/usr --enable-xml --disable-rpath --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --with-curl --enable-mbregex --enable-fpm --enable-mbstring --with-mcrypt --with-gd --enable-gd-native-ttf --with-openssl --with-mhash --enable-pcntl --enable-sockets --with-xmlrpc --enable-soap --enable-short-tags --enable-static --with-xsl --with-fpm-user=www --with-fpm-group=www --enable-ftp --enable-opcache=no

  配置完成後,上面的錯誤代碼就沒有了,於是進行了下面的編譯和編譯安裝

編譯安裝PHP 時遇到問題解決方法.