1. 程式人生 > >CentOS 5.4安裝 libmcrypt 2.5.8 錯誤及其解決方案記錄

CentOS 5.4安裝 libmcrypt 2.5.8 錯誤及其解決方案記錄

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

分析:

明明我安裝了libmcrypt 2.5.8 ,可是竟然提示沒有發現!然後在/usr/local/bin/找到了LIBMCRYPT_CONFIG ,這一步明確了是PATH變數的問題 !

解決方法:

ln -s /usr/local/lib/libmcrypt.la /usr/lib/libmcrypt.la
ln -s /usr/local/lib/libmcrypt.so /usr/lib/libmcrypt.so
ln -s /usr/local/lib/libmcrypt.so.4 /usr/lib/libmcrypt.so.4
ln -s /usr/local/lib/libmcrypt.so.4.4.8 /usr/lib/libmcrypt.so.4.4.8

ln -s /usr/local/bin/libmcrypt-config /usr/bin/libmcrypt-config