Home > Backend Development > PHP Tutorial > PHP安装mcrypt.so报错 mcrypt.h not found 的解决方法

PHP安装mcrypt.so报错 mcrypt.h not found 的解决方法

WBOY
Release: 2016-06-13 12:00:03
Original
926 people have browsed it

PHP安装mcrypt.so报错 mcrypt.h not found 的解决办法

报错内容:configure: error: mcrypt.h not found. Please reinstall libmcrypt

网上搜索了很多,包括自带的 yum install libmcrypt libmcrypt-devel,这个是没有效果的。

去SourceForget下载libmcrypt http://sourceforge.net/projects/mcrypt/files/Libmcrypt/ ,最新版是mcrypt 2.6.7.gz。下载下来安装仍旧报错libmcrypt没有找到!


继续测试,最后安装成功,感觉是版本太高。

方法(关键点在用 2.5.7版本):

#使用wget可以通过以下路径下载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 #编译(默认安装到/usr/local/lib/)./configure --prefix=/usr/local/libmcrypt #执行安装make && make install
Copy after login


再回到PHP-5.5.13解压缩的ext目录的mcrypt里面
phpize./configure --with-php-config=/usr/local/php5/bin/php-config \--with-libmcrypt=/usr/lib/libmcryptmakemake testmake installvim /etc/php.ini  #加入extension=mcrypt.so
Copy after login

(2014-6-19 by default7#zbphp.com)




Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template