Chinaunix首页 | 论坛 | 博客
  • 博客访问: 200715
  • 博文数量: 87
  • 博客积分: 10
  • 博客等级: 民兵
  • 技术积分: 840
  • 用 户 组: 普通用户
  • 注册时间: 2012-07-18 21:12
文章分类

全部博文(87)

文章存档

2014年(86)

我的朋友

分类: PHP

2014-05-14 10:09:33

  安装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) |
给主人留下些什么吧!~~