编译安装libmcrypt
作者:互联网
环境准备
下载libmcrypt(不推荐这种,建议真机上用迅雷下,再用rz上传到服务器)
下载链接
libmcrypt
https://sourceforge.net/projects/mcrypt/files/Libmcrypt/2.5.8/libmcrypt-2.5.8.tar.gz
下载mhash(安装mcrypt需要此软件包)
https://acelnmp.googlecode.com/files/mhash-0.9.9.9.tar.gz
下载mcrypt
https://lcmp.googlecode.com/files/mcrypt-2.6.8.tar.gz
解压
[root@localhost src]# tar -zxvf libmcrypt-2.5.8.tar.gz
[root@localhost src]# tar -zxvf mcrypt-2.6.8.tar.gz
[root@localhost src]# tar -zxvf mhash-0.9.9.9.tar.gz
编译安装
进入软件目录,执行预处理操作
[root@localhost src]# cd libmcrypt-2.5.8/
[root@localhost libmcrypt-2.5.8]# ./configure
编译安装libmcrypt-2.5.8稍微有点不同(需要顺带编译libltdl模块,省略这一步可能导致后期频繁出现系统缺少libltdl.so.3的错误)
[root@localhost libmcrypt-2.5.8]# make && make install
[root@localhost libmcrypt-2.5.8]# /sbin/ldconfig
[root@localhost libmcrypt-2.5.8]# cd libltdl/
[root@localhost libltdl]# ./configure --enable-ltdl-install
[root@localhost libltdl]# make && make install
软链接
[root@localhost mcrypt-2.6.8]# ln -s /usr/local/bin/libmcrypt_config /usr/bin/libmcrypt_config
设置环境变量(不然安装mcrypt会报错,找不到位置)
[root@localhost mcrypt-2.6.8]# export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
同理:
安装mhash
[root@localhost libmcrypt-2.5.8]# cd ../mhash-0.9.9.9/
[root@localhost mhash-0.9.9.9]# ./configure
[root@localhost mhash-0.9.9.9]# make && make install
安装mcrypt
[root@localhost mhash-0.9.9.9]# cd ../mcrypt-2.6.8/
[root@localhost mcrypt-2.6.8]# ./configure
[root@localhost mcrypt-2.6.8]# make &&make install
标签:tar,root,编译,libmcrypt,2.5,mcrypt,安装,localhost 来源: https://www.cnblogs.com/hxlinux/p/13551689.html