我是在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/

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

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

    yum install -y epel-releaseyum install -y libmcrypt-devel

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

    编译出现错误: configure: error: mcrypt.h not found. Please reinstall libmcrypt. 解决方法: yum install -y libmc ...

  3. 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     # 编辑库文件 /us ...

  4. PHP编译安装出错configure: error: mcrypt.h not found. Please reinstall libmcrypt的解决办法

    1.下载libmcrypt wget http://jaist.dl.sourceforge.net/project/mcrypt/Libmcrypt/2.5.8/libmcrypt-2.5.8.ta ...

  5. Python3.6安装报错 configure: error: no acceptable C compiler found in $PATH

    安装python的时候出现如下的错误: [root@master ~]#./configure --prefix=/usr/local/python3.6 checking build system ...

  6. 【linux】Python3.6安装报错 configure: error: no acceptable C compiler found in $PATH

    安装python的时候出现如下的错误: [root@master ~]#./configure --prefix=/usr/local/python3.6 checking build system ...

  7. php 编译时 报错 configure: error: libXpm.(a|so) not found.

    编译环境 centos7 php 5.4.26 $ yum install libXpm-devel 显示已安装 百度得知 ubuntu虚拟机安装lamp遇到的问题 configure: error: ...

  8. nginx安装报错:configure: error: the HTTP rewrite module requires the PCRE library

    参考:http://blog.51cto.com/williamx/958398 需要安装pcre-devel与openssl-devel yum -y install pcre-devel open ...

  9. mac编译PHP报错 configure: error: Please reinstall the libcurl distribution - easy.h should be in <curl-dir>/include/curl/

    解决办法 brew install curl xcode-select --install

随机推荐

  1. Oracle单机Rman笔记[3]---RMAN脱机备份及命令基础介绍

    A.NOARCHIVELOG模式下的物理备份 1.完全关闭数据库 2.备份所有的数据库文件.控制文件.联机重做日志 3.重新启动数据库 B.RMAN的体系结构概述 重新构建控制文件: 将控制文件备份为 ...

  2. Django 之 cookie和session

    一. Cookie 1.Cookie的由来 因为HTTP协议是无状态的,无状态的意思就是每次请求都是独立的,它的执行情况和结果与前面的请求和之后的请求都无直接关系,也不会受前后请求响应情况直接影响.简 ...

  3. RK3288 GPIO

    简介GPIO, 全称 General-Purpose Input/Output(通用输入输出),是一种软件运行期间能够动态配置和控制的通用引脚.RK3288有9组 GPIO bank: GPIO0,G ...

  4. 跟随我在oracle学习php(11)

    数组专题 数组遍历: 1,普通for循环,经常用的数组遍历 var arr = [1,2,0,3,9]; for ( var i = 0; i <arr.length; i++){ consol ...

  5. js中时间戳与日期格式的相互转换

    1. 将时间戳转换成日期格式: function timestampToTime(timestamp) { var date = new Date(timestamp * 1000);//时间戳为10 ...

  6. unity中多个门的开关动画保持独立性

    List<Animation> storeAnimation; public void Awake() { storeAnimation = new List<Animation&g ...

  7. C#如何在生成文件夹或者文件时候自动重命名

    如果你在一个文件夹里面, 连续添加文件夹或者文件(不改名字), 那么系统会自动加上(1),(2),(3)... 这个效果我在网上搜不到, 自己写一下也不太难. 文件夹的:(不断点击按钮就有效果) pr ...

  8. linux 虚拟机配置固定ip

    参考这边博客: https://blog.csdn.net/u014466635/article/details/80284792 但是这个有个小问题,就是没有配置dns,导致连不上公网 /etc/s ...

  9. 单链表ADT

    本博客第一篇学术性博客,所以还是写点什么东西: 首先这篇博客以及以后的博客中的代码尽量百分之90是自己写过的: 可能有部分图片和代码是我认为别人更好的故摘抄下来, 本人三观正确,所以一定会表明来源: ...

  10. spring cloud + spring boot + springmvc+mybatis分布式微服务云架构

    做一个微服务架构需要的技术整理: View: H5.Vue.js.Spring Tag.React.angularJs Spring Boot/Spring Cloud:Zuul.Ribbon.Fei ...