安装php:
tar xvf php-5.3.6.tar.gz
cd php-5.5.12
./configure --prefix=/usr/local/webserver/php --mandir=/usr/local/share/man --infodir=/usr/local/share/info --with-apxs2=/usr/local/webserver/apache/bin/apxs --enable-cgi --with-mysql=/usr/local/webserver/mysql/ --with-config-file-path=/usr/local/webserver/php/etc --with-pdo-mysql=/usr/local/webserver/mysql --with-mysqli=/usr/local/webserver/mysql/bin/mysql_config --enable-zip --enable-sqlite-utf8 -enable-sockets --enable-soap --enable-pcntl --enable-mbstring --enable-intl --enable-calendar --enable-bcmath --enable-exif --with-mcrypt --with-mhash --with-gd --with-png-dir --with-jpeg-dir --with-freetype-dir --with-libxml-dir --with-curl --with-curlwrappers --with-zlib --with-openssl --with-kerberos=shared --with-gettext=shared --with-xmlrpc=shared
报错: configure: error: mcrypt.h not found. Please reinstall libmcrypt.
安装libmcrypt(加密算法补充库): tar -zxvf libmcrypt-2.5.7.gz
cd libmcrypt-2.5.7
ls -la
mkdir -p /usr/local/libmcrytp
./configure prefix=/usr/local/libmcrytp/
make
make install
再次编译php
仍旧报错: configure: error: mcrypt.h not found. Please reinstall libmcrypt.
编译时加配置mcrypt的参数: ./configure --prefix=/usr/local/webserver/php --mandir=/usr/local/share/man --infodir=/usr/local/share/info --with-apxs2=/usr/local/webserver/apache/bin/apxs --enable-cgi --with-mysql=/usr/local/webserver/mysql/ --with-config-file-path=/usr/local/webserver/php/etc --with-pdo-mysql=/usr/local/webserver/mysql --with-mysqli=/usr/local/webserver/mysql/bin/mysql_config --enable-zip --enable-sqlite-utf8 --enable-sockets --enable-soap --enable-pcntl --enable-mbstring --enable-intl --enable-calendar --enable-bcmath --enable-exif --with-mcrypt --with-mhash --with-gd --with-png-dir --with-jpeg-dir --with-freetype-dir --with-libxml-dir --with-curl --with-curlwrappers --with-zlib --with-openssl --with-kerberos=shared --with-gettext=shared --with-xmlrpc=shared --with-mcrypt=/usr/local/libmcrytp/lib
再次编译php 仍旧同样的错。
然后 安装libmcrypt and libmcrypt-devel
rpm -ivh libmcrypt-2.5.8-9.el6.x86_64.rpm
rpm -ivh libmcrypt-devel-2.5.8-9.el6.x86_64.rpm
再次编译php 不再报错:
./configure --prefix=/usr/local/webserver/php --mandir=/usr/local/share/man --infodir=/usr/local/share/info --with-apxs2=/usr/local/webserver/apache/bin/apxs --enable-cgi --with-mysql=/usr/local/webserver/mysql/ --with-config-file-path=/usr/local/webserver/php/etc --with-pdo-mysql=/usr/local/webserver/mysql --with-mysqli=/usr/local/webserver/mysql/bin/mysql_config --enable-zip --enable-sqlite-utf8 --enable-sockets --enable-soap --enable-pcntl --enable-mbstring --enable-intl --enable-calendar --enable-bcmath --enable-exif --with-mcrypt --with-mhash --with-gd --with-png-dir --with-jpeg-dir --with-freetype-dir --with-libxml-dir --with-curl --with-curlwrappers --with-zlib --with-openssl --with-kerberos=shared --with-gettext=shared --with-xmlrpc=shared
阅读(4097) | 评论(0) | 转发(0) |