安裝到mcrypt的時(shí)候出現(xiàn)了問題 ./configure 提示出錯(cuò),首先提示 *** Could not run libmcrypt test program, checking why… *** The test program failed to compile or link. See the file config.log for the *** exact error that occured. This usually means LIBMCRYPT was incorrectly installed *** or that you have moved LIBMCRYPT since it was installed. In the latter case, you *** may want to edit the libmcrypt-config script: no configure: error: *** libmcrypt was not found 找了相關(guān)資料,得出解決方法明明我安裝了libmcrypt 2.5.8 ,可是竟然提示沒有發(fā)現(xiàn)!然后在/usr/local/bin/找到了LIBMCRYPT_CONFIG ,這一步明確了是PATH變量的問題 ! 方法是ln -s /usr/local/bin/libmcrypt_config /usr/bin/libmcrypt_config 之后繼續(xù)進(jìn)行./configure 仍然報(bào)錯(cuò): *** 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
繼續(xù)查找,還是變量的問題 解決方法如下:運(yùn)行 export LD_LIBRARY_PATH=/usr/local/lib: LD_LIBRARY_PATH 然后make ; make install 完成