封尘网

让学习成为一种习惯!

安装mcrypt-2.6.8遇错configure error libmcrypt was

博客使用LNMP环境,所以就要配置PHP,PHP的环境配置还是比较复杂,当然也有一键安装的集成包,但是作为一个专业的运维人员都喜欢自己编译,因为它更加可定制化。更重要的可以装一下逼;

编译安装到mcrypt的时候出现了问题

./configure

发现刷的一下子很快就OK好,然后提示出错,首先提示

*** Could not run libmcrypt test program, checking why...
*** The test program compiled, but did not run. This usually means
*** that the run-time linker is not finding LIBMCRYPT or finding the wrong
*** version of LIBMCRYPT. If it is not finding LIBMCRYPT, you'll need to set your
*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point
*** to the installed location  Also, make sure you have run ldconfig if that
*** is required on your system
***
*** If you have an old version installed, it is best to remove it, although
*** you may also be able to get things to work by modifying LD_LIBRARY_PATH
***
configure: error: *** libmcrypt was not found

跟据上面的提示:

解决方法如下:运行命令

export LD_LIBRARY_PATH=/usr/local/lib: LD_LIBRARY_PATH

重新./configure

然后make && make install

完成

提醒:本文最后更新于 1433 天前,文中所描述的信息可能已发生改变,请谨慎使用。