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

简介:

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

1
2
3
4
5
6
7
8
9
10
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

错误详情:

1
2
3
4
5
6
7
8
9
10
11
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

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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

无报错,解决问题!



本文转自 yawei555 51CTO博客,原文链接:http://blog.51cto.com/huwei555/1783598,如需转载请自行联系原作者

相关文章
|
11月前
|
Ubuntu
ubuntu报错:OpenSSL is not properly installed on your system.
ubuntu报错:OpenSSL is not properly installed on your system.
161 0
|
2月前
|
Ubuntu Linux 开发工具
升级openssh前安装zlib报异常configure aborting
【8月更文挑战第22天】当升级OpenSSH前安装zlib遇到“configure aborting”异常,可尝试:1) 检查并确保所需依赖项(如gcc、make)已安装且版本兼容;2) 核实环境变量(如`PATH`, `LD_LIBRARY_PATH`)正确无误;3) 确认zlib版本与系统架构及OS版本匹配;4) 手动配置编译参数(如`--prefix`, `--with-pic`);5) 仔细审查configure脚本输出的错误信息;6) 在相关社区寻求帮助或查阅官方文档。遵循上述步骤有助于解决安装问题,顺利完成OpenSSH升级。
|
4月前
|
Ubuntu PHP
ubuntu php libzip安装 ./configure报错 checking for libzip... not found configure
ubuntu php libzip安装 ./configure报错 checking for libzip... not found configure
88 1
|
Linux Python
错误解决办法:zipimport.ZipImportError: can't decompress data; zlib not available
错误解决办法:zipimport.ZipImportError: can't decompress data; zlib not available
372 0
|
Shell 开发工具 C语言
php-7.3.13 configure: error: Please reinstall the libzip distribution
php-7.3.13 configure: error: Please reinstall the libzip distribution
235 0
php-7.3.13 configure: error: Please reinstall the libzip distribution
|
缓存 Linux 虚拟化
linux下yum安装时出现Loaded plugins: fastestmirror解决办法
linux下yum安装时出现Loaded plugins: fastestmirror解决办法
2055 0