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编译安装报错:configure: error: mcrypt.h not found. Please reinstall libmcrypt的更多相关文章
- 解决php编译报错configure: error: mcrypt.h not found. Please reinstall libmcrypt.
yum install -y epel-releaseyum install -y libmcrypt-devel
- configure: error: mcrypt.h not found. Please reinstall libmcrypt.
编译出现错误: configure: error: mcrypt.h not found. Please reinstall libmcrypt. 解决方法: yum install -y libmc ...
- 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 ...
- 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 ...
- Python3.6安装报错 configure: error: no acceptable C compiler found in $PATH
安装python的时候出现如下的错误: [root@master ~]#./configure --prefix=/usr/local/python3.6 checking build system ...
- 【linux】Python3.6安装报错 configure: error: no acceptable C compiler found in $PATH
安装python的时候出现如下的错误: [root@master ~]#./configure --prefix=/usr/local/python3.6 checking build system ...
- php 编译时 报错 configure: error: libXpm.(a|so) not found.
编译环境 centos7 php 5.4.26 $ yum install libXpm-devel 显示已安装 百度得知 ubuntu虚拟机安装lamp遇到的问题 configure: error: ...
- 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 ...
- mac编译PHP报错 configure: error: Please reinstall the libcurl distribution - easy.h should be in <curl-dir>/include/curl/
解决办法 brew install curl xcode-select --install
随机推荐
- KiB 、十进制单位转换 、二进制单位转换
KiB是kilo binary byte的缩写,指的是千位二进制字节 KB是kilobyte的缩写,指的是千字节 二进制标准命名 十进制国际单位制SI标准: 1 KB= 1,000 Byte ...
- XML文档的简易增删查改
dom4j解析一.利用dom4j操作元素节点 1.查询第一本书的书名,并输出到控制台 2.给第一本书添加一个特价节点, 并修改第一本书的售价节点的内容为19.8元 3.删除第二本书的作者节点二.利用d ...
- 跟随我在oracle学习php(14)
CSS3的@keyframes用法详解: 此属性与animation属性是密切相关的,关于animation属性可以参阅CSS3的animation属性用法详解一章节. 一.基本知识: keyfram ...
- fastjson对象转为json字符串日期格式变为时间戳问题
今天尝试将map集合转为json对象时遇到一个问题.map中的value为日期格式如"2019-03-01",在使用JSONObject.toJSON(map).toString( ...
- 常被问到的十个 Java 面试题
在这篇文章中,我试图收录最有趣和最常见的问题.此外,我将为您提供正确的答案. 接下来,就让我们来看看这些问题. 1. 以满分十分来评估自己——你有多擅长 Java? 如果你并不完全确信你自己或是你对 ...
- 使用img2html把图片转为网页
代码如下: # -*- coding: utf-8 -*- # Nola """ img2html : Convert image to HTML optional ar ...
- Unity配置安卓开发环境
1. 首先要安装JDK,从网上下载即可,我用的版本如下图 注意:此时要保存JDK的路径信息,后面需要使用2. 配置环境变量,计算机右键点属性->高级->环境变量3. 在系统中新建环境变量 ...
- MSSQL转Mysql常用函数,语法等
MSSQL转Mysql常用 一.字段类型 MSSQL Mysql 备注 "nchar" "char()" 最大长度为255 "nvarchar&quo ...
- 自己设置 WiFi
不想安装免费WiFi? 简单,一行命令搞定 首先,打开你的 cmd 面板, 然后敲出命令: netsh wlan set hostednetwork mode=allow ssid=wifi key= ...
- shiro的单机版 和 集群版
在我们的开发当中 我们一般权限都是个 比较繁琐 但又必不可少的 一部分 [不管我们的 数据库设计 还是我们采用何种技术 我们的权限库表 大多都是大同小异 业务逻辑也是如此] 在我们不使用任何框架 ...