搭建LNMP,php编译错误

回复 收藏

错误显示:configure: error: mcrypt.h not found. Please reinstall libmcrypt

原因:因为Centos 6的yum源里并没libmcrypt的包

下载:

wget http://mirrors.hust.edu.cn/epel/6/x86_64/libmcrypt-2.5.8-9.el6.x86_64.rpm 

wget http://mirrors.hust.edu.cn/epel/6/x86_64/libmcrypt-devel-2.5.8-9.el6.x86_64.rpm 

编译安装即可

附赠5.4.8的编译参数

./configure --prefix=/usr/local/php \--with-apxs2=/usr/local/apache2/bin/apxs \  #此行仅在apache+php下使用,nginx+php时请去掉--with-config-file-path=/usr/local/php/etc \--with-mysql=/usr/local/mysql \--with-mysqli=/usr/local/mysql/bin/mysql_config \--with-iconv-dir \--with-jpeg-dir \--with-png-dir \--with-zlib \--with-libxml-dir \--enable-xml \--disable-rpath \--enable-bcmath \--enable-shmop \--enable-sysvsem \--enable-inline-optimization \--with-curl \--with-curlwrappers \--enable-mbregex \--enable-fpm \--enable-mbstring \--with-mcrypt \--with-gd \--with-freetype-dir \--enable-gd-native-ttf \--with-openssl \--with-mhash \--enable-pcntl \--enable-sockets \--with-ldap \--with-ldap-sasl \--with-xmlrpc \--enable-zip \--enable-soap \--enable-session \--with-gettext \--enable-pdo \--with-pdo-mysql \--enable-shared \--enable-ftp \--enable-exif \--with-pear

2017-03-04 11:25 举报
已邀请:

回复帖子,请先登录注册

退出全屏模式 全屏模式 回复
评分
可选评分理由: