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
随机推荐
- IO多路复用版FTP
需求: 实现文件上传及下载功能 支持多连接并发传文件 使用select or selectors 流程图 import socket import pickle import sys import t ...
- 生成git,ssh的key
git clone ssh 代码: 报错: Warning: Permanently added 'gitee.com,120.55.226.24' (ECDSA) to the list of kn ...
- VMProtect1.63分析
教材上给出了一些说明,虽然是断断续续的.. ..之后通过单步,把断的地方都连起来了,也明白了VMP分析插件究竟做了些什么.. //表1,表2在最后. 加密之前的代码: INC ECX C3 RETN ...
- PHP调用Python接口过程中所遇到的问题
在php调用python脚本时,首先把python相关组件安装完善.用Python命令检测运行脚本而不报错. 在调用接口的过程 1.没有打开的python脚本的权限 解决办法:把python脚本所在的 ...
- CAT部署安装文档
多数软件都在/root/project/codebase/3rdpart redhat7用firewalld取代了iptables,遇到问题请添加redhat7关键字搜索,详情请参见Common ad ...
- python入门(三)
一.判断(精简代码) 非空为真,非0为真# 不为空的话就是true,是空的话就是false# 只要不是0就是true,是0就是falsea=[]#list也是假的b={}#字典也是假的c=0 #也是假 ...
- java基础2(二)
Servlet 注意: servletConfig可以获取配置文件(xml文件)中配置的servlet对象的初始化参数. url-pattern 缺省servlet 注意:tomcat目录下有一个默认 ...
- servlet异步处理机制
Servlet 3.0 之前,一个普通 Servlet 的主要工作流程大致如下:首先,Servlet 接收到请求之后,可能需要对请求携带的数据进行一些预处理:接着,调用业务接口的某些方法,以完成业务处 ...
- Docker搭建LNMP网站平台
1.自定义网络 [root@linux-docker01 ~]# docker network create lnmp 67e7e0736b2c58f8f81eed50130803b34be0583f ...
- SharePoint Framework 在web部件中使用第三方样式 - 将第三方样式打到包中
博客地址:http://blog.csdn.net/FoxDave 有许多第三方库可以帮助我们构建丰富的SharePoint Framework客户端web部件.并且这些JavaScript脚本常常包 ...