龚哥哥 - 山里男儿 爱生活、做自己!
安装PHP错误:configure: error: mcrypt.h not found. Plea
发表于 2015-8-31 | 服务器

今天在编译php的时候,出现如下错误php安装出错:configure: error: mcrypt.h not found. Please reinstall libmcrypt.,意思是,没有查找到mcrytp.h,需要安装libcrytp,在下面的地址下载libmarypt:

解决办法一

1、安装第三方yum源
wget http://www.atomicorp.com/installers/atomic
chmod a+x chmod
sh ./atomic

2、使用yum命令安装
yum  install  php-mcrypt  libmcrypt  libmcrypt-devel 

解决办法二

使用php mcrypt 前必须先安装Libmcrypt

wget ftp://mcrypt.hellug.gr/pub/crypto/mcrypt/attic/libmcrypt/libmcrypt-2.5.7.tar.gz

安装

tar -zxvf libmcrypt-2.5.7.tar.gz
cd libmcrypt-2.5.7
mkdir -p /usr/local/libmcrypt
./configure prefix=/usr/local/libmcrypt/
make
make install

然后再安装PHP

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

如果以上方法仍然不能安装,请参考:

rpm -ivh "http://www.lishiming.net/data/attachment/forum/month_1211/epel-release-6-7.noarch.rpm

yum install -y libmcrypt-devel 

因为centos6.x 默认的yum源没有libmcrypt-devel 这个包,只能借助第三方yum源。

文章原创地址:http://blog.163.com/yxba_02/blog/static/1875576201272583532588/

发表评论:

TOP