解决libmcrypt was not found,无法安装mcrypt

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了解决libmcrypt was not found,无法安装mcrypt相关的知识,希望对你有一定的参考价值。

线上一台服务器安装lnmp环境,安装libmcrypt成功,安装mcrypt的时候发生错误:

cd /usr/local/src/
tar -zxvf libmcrypt-2.5.7.tar.gz
cd libmcrypt-2.5.7
./configure
make && make install

cd /usr/local/src/
tar -zxvf mcrypt-2.6.8.tar.gz
cd mcrypt-2.6.8
./configure

错误详情:

checking for libmcrypt – version >= 2.5.0…
*** ‘libmcrypt-config –version’ returned 2.4.0, but LIBMCRYPT (2.5.8)
*** was found! If libmcrypt-config was correct, then it is best
*** to remove the old version of LIBMCRYPT. You may also be able to fix the error
*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing
*** /etc/ld.so.conf. Make sure you have run ldconfig if that is
*** required on your system.
*** If libmcrypt-config was wrong, set the environment variable LIBMCRYPT_CONFIG
*** to point to the correct copy of libmcrypt-config, and remove the file config.cache
*** before re-running configure
configure: error: *** libmcrypt was not found

参考百度以下各种办法,发现都无法解决:

http://www.linuxidc.com/Linux/2010-08/27598.htm

http://www.zihou.me/html/2014/05/08/9404.html

参考该文解决问题:

http://blog.csdn.net/alexdream/article/details/7408577

tar -zxvf libmcrypt-2.5.7.tar.gz
cd libmcrypt-2.5.7
./configure  --prefix=/usr/local/libmcrypt
make
make install
wget 
tar -zxvf mhash-0.9.9.9.tar.gz
cd mhash-0.9.9.9
./configure
make
make install 
cd /usr/local/src/mcrypt-2.6.8
LD_LIBRARY_PATH=/usr/local/libmcrypt/lib:/usr/local/lib ./configure --with-libmcrypt-prefix=/usr/local/libmcrypt
make
make install

无报错,解决问题!

本文出自 “海底两万里” 博客,请务必保留此出处http://huwei555.blog.51cto.com/1347480/1783598

以上是关于解决libmcrypt was not found,无法安装mcrypt的主要内容,如果未能解决你的问题,请参考以下文章

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

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

PHP编译安装报错: mcrypt.h not found. Please reinstall libmcrypt.

Object not found! The requested URL was not found on this server.... 报错解决方案

Python version 3.6 required, which was not found in the registry错误解决

python version 2. required,which was not found in the registry 解决方案