PHP编译安装报错:configure: error: mcrypt.h not found. Please reinstall libmcrypt

我是在CentOS6.5安装php5.5.28这个版本,PHP编译代码如下:

./configure --prefix=/usr/local/php --with-config-file-path=/usr/local/php/etc --with-mysql=/usr/local/mysql --with-mysqli=/usr/local/mysql/bin/mysql_config --with-mysql-sock=/tmp/mysql.sock --with-gd --with-iconv --with-zlib --with-fpm-user=php --with-fpm-group=php --enable-xml --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --enable-mbregex --enable-fpm --enable-mbstring --enable-ftp --enable-gd-native-ttf --with-openssl --enable-pcntl --enable-sockets --with-xmlrpc --enable-zip --enable-soap --with-pear --with-gettext --enable-session  --with-curl --enable-exif

安装过程不再赘述。因为在编译安装时没有把mcrypt这个扩展编译进去,所以在phpmyadmin里有这样一句提示:

缺少 mcrypt 扩展。请检查 PHP 配置。

另外在独立安装mycrypt扩展时,报错:

configure: error: mcrypt.h not found. Please reinstall libmcrypt.

现在把mcrypt扩展安装过程贴出来,希望对遇到此类问题的朋友有帮助:

1.首先编译安装  libmcrypt,  mhash,  mcrypt  二进制源码包。

========================================

下载libmcrypt-2.5.8.tar.gz

tar zxvf libmcrypt-2.5.8.tar.gz

cd libmcrypt-2.5.8

./configure --prefix=/usr/local/libmcrypt

make

make install

=========================================

下载mhash-0.9.9.9.tar.gz

tar zxvf mhash-0.9.9.9

cd mhash-0.9.9.9

./configrue --prefix=/usr/local/mhash

make

make install

=========================================

tar zxvf mcrypt-2.6.8.tar.gz

cd mcrypt-2.6.8

export LD_LIBRARY_PATH=/usr/local/libmcrypt/lib:/usr/local/mhash/lib

export LDFLAGS="-L/usr/local/mhash/lib -I/usr/local/mhash/include/"

export CFLAGS="-I/usr/local/mhash/include/"

./configure --prefix=/usr/local/mcrypt --with-libmcrypt-prefix=/usr/local/libmcrypt

make

make install

=========================================

cd /usr/local/src/develop/php-5.5.28/ext/mcrypt

/usr/local/php/bin/phpize

./configure --with-php-config=/usr/local/php/bin/php-config  --with-mcrypt=/usr/local/libmcrypt

make

make install

生成的mcrypt.so文件已经被发送到 /usr/local/php/lib/php/extensions/no-debug-non-zts-20121212/mcrypt.so

因为我在php.ini设置extension_dir = /usr/local/php/extensions,

所以需要执行:

cp /usr/local/php/lib/php/extensions/no-debug-non-zts-20121212/mcrypt.so  /usr/local/php/extensions

然后在php.ini里面添加:

extension=mcrypt.so

重启php,执行: service php-fpm restart

运行phpinfo(),发现新增了mcrypt扩展项,而且phpmyadmin里面关于mcrypt的提示也不见了。

在安装过程中走了弯路,一度鄙视这种编译安装方式,多亏了这位大神发的帖子帮忙。

详见: http://segmentfault.com/q/1010000000094627

==============================================================

64位Centos报错:

configure: error: Cannot find ldap libraries in /usr/lib.

解决方法是执行命令: cp -frp /usr/lib64/libldap* /usr/lib/

原文地址:https://www.cnblogs.com/ralphdc/p/10503964.html

时间: 2024-10-16 10:09:52

PHP编译安装报错:configure: error: mcrypt.h not found. Please reinstall libmcrypt的相关文章

php 编译安装报错 configure: error: mcrypt.h not found. Please reinstall libmcrypt.

编译安装php时报错的解决方法: 错误一:configure: error: mcrypt.h not found. Please reinstall libmcrypt. 解决办法:需要安装Libmcrypt wget http://softlayer.dl.sourceforge.net/sourceforge/mcrypt/libmcrypt-2.5.8.tar.gz        tar -zxvf libmcrypt-2.5.8.tar.gz        cd /usr/local/

解决php编译报错configure: error: mcrypt.h not found. Please reinstall libmcrypt.

yum install -y epel-releaseyum install -y libmcrypt-devel 原文地址:https://www.cnblogs.com/finnlee/p/8992374.html

安装php出错configure: error: mcrypt.h not found. Please reinstall libmcrypt

wget ftp://mcrypt.hellug.gr/pub/crypto/mcrypt/attic/libmcrypt/libmcrypt-2.5.7.tar.gz 安装: 66 tar -zxvf libmcrypt-2.5.7.tar.gz 67 cd libmcrypt-2.5.7 68 mkdir -p /usr/local/libmcrypt 69 ./configure prefix=/usr/local/libmcrypt/ 70 make 71 make install 记得

php5.6.11编译安装报错configure: error: Don't know how to define struct flock on this system

centos 6.8 32位系统下,安装php.5.6.11是出现这个错误 解决办法: 1 2 3 4 vim /etc/ld.so.conf.d/local.conf     # 编辑库文件 /usr/local/lib                       # 添加该行 :wq                                  # 保存退出 ldconfig -v                          # 使之生效 注意事项: 这里添加的库文件路径一定要和你

configure: error: mcrypt.h not found. Please reinstall libmcrypt.

rpm -ivh "http://www.aminglinux.com/bbs/data/attachment/forum/month_1211/epel-release-6-7.noarch.rpm" yum install -y  libmcrypt-devel

nginx安装报错./configure: error: the http rewrite module requires the pcre library.

nginx编译时报错: ./configure: error: the http rewrite module requires the pcre library. 解决方法: [[email protected] nginx-1.5.9]#  yum install zlib-devel -y

configure: error: mcrypt.h not found. Please reins

今天service层代码报错,mcrypt 系列函数没有定义(项目中接了ID5做身份认证) 于是开始编一个mcrypt扩展 出现如下错误:configure: error: mcrypt.h not found. Please reinstall libmcrypt. 处理之: wget ftp://mcrypt.hellug.gr/pub/crypto/mcrypt/attic/libmcrypt/libmcrypt-2.5.7.tar.gz tar -zxvf libmcrypt-2.5.7

PHP编译安装报错: mcrypt.h not found. Please reinstall libmcrypt.

PHP编译安装报错: mcrypt.h not found. Please reinstall libmcrypt. 转载2016-04-25 12:40:44 标签:linuxitphp 解决方法: 1.为系统安装perl-Geo-IP,默认yum源中没有这个包,特意安装epel第三方yum源[[email protected] ~] rpm -Uvh http://mirrors.sohu.com/fedora-epel/6/x86_64/epel-release-6-8.noarch.rp

linux下安装php报错configure: error: Cannot find MySQL header files under /usr/include/mysql.

linux下安装php报错configure: error: Cannot find MySQL header files under /usr/include/mysql. 2013-03-04 15:34wdjhz | 分类:服务器软件 | 浏览5318次 configure: error: Cannot find MySQL header files under /usr/include/mysql.Note that the MySQL client library is not bun