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

yum install -y epel-release
yum install -y libmcrypt-devel
两个不能一起安装,因为CentOs6默认的yum源没有 libmcrypt-devel这个包,只能借助epel的yum源,所以先安装epel,再安装libmcrypt。

cat /etc/redhat-release // 查看版本
wget http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm // 下载
sudo rpm -ivh epel-release-6-8.noarch.rpm // 安装
yum repolist // 检查
yum install -y epel-release // 安装
【解决php编译报错configure:|解决php编译报错configure: error: mcrypt.h not found. Please reinstall libmcrypt.】yum install -y libmcrypt-devel // 安装

    推荐阅读