2、下载libmcrypt(安装mcrypt需要此软件包)
http://nchc.dl.sourceforge.net/project/mcrypt/Libmcrypt/2.5.8/libmcrypt-2.5.8.tar.gz
3、下载mhash(安装mcrypt需要此软件包)
https://acelnmp.googlecode.com/files/mhash-0.9.9.9.tar.gz
4、下载mcrypt
https://lcmp.googlecode.com/files/mcrypt-2.6.8.tar.gz
二、安装软件包
1、安装libmcrypt
cd /usr/local/src
tar zxvf libmcrypt-2.5.8.tar.gz
cd libmcrypt-2.5.8
./configure
make
make install
sleep 2
/sbin/ldconfig
cd libltdl/
./configure --enable-ltdl-install
make
make install
cd ../../
2、安装mhash [加密扩展库]
cd /usr/local/src
tar zxvf mhash-0.9.9.9.tar.gz
cd mhash-0.9.9.9
./configure
make
make install
sleep
cd ../
rm -f /usr/lib64/libmcrypt.*
rm -f /usr/lib64/libmhash*
ln -s /usr/local/lib64/libmcrypt.la /usr/lib64/libmcrypt.la
ln -s /usr/local/lib64/libmcrypt.so /usr/lib64/libmcrypt.so
ln -s /usr/local/lib64/libmcrypt.so.4 /usr/lib64/libmcrypt.so.4
ln -s /usr/local/lib64/libmcrypt.so.4.4.8 /usr/lib64/libmcrypt.so.4.4.8
ln -s /usr/local/lib64/libmhash.a /usr/lib64/libmhash.a
ln -s /usr/local/lib64/libmhash.la /usr/lib64/libmhash.la
ln -s /usr/local/lib64/libmhash.so /usr/lib64/libmhash.so
ln -s /usr/local/lib64/libmhash.so.2 /usr/lib64/libmhash.so.2
ln -s /usr/local/lib64/libmhash.so.2.0.1 /usr/lib64/libmhash.so.2.0.1
ln -s /usr/local/bin/libmcrypt-config /usr/bin/libmcrypt-config
#32位系统 lib64换成lib
3、安装mcrypt
cd /usr/local/src
tar zxvf mcrypt-2.6.8.tar.gz
cd mcrypt-2.6.8
ln -s /usr/local/bin/libmcrypt_config /usr/bin/libmcrypt_config #添加软连接
export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH #添加环境变量
./configure
make
make install
或者 老男孩
tar zxvf mcrypt-2.6.8.tar.gz
cd mcrypt-2.6.8
/sbin.ldconfig
./configure LD_LIBRARY_PATH==/usr/local/lib
make
make install
本文来自博客园,作者:孙龙-程序员,转载请注明原文链接:https://www.cnblogs.com/sunlong88/articles/8681705.html