怎样编译安装MCrypt

2017年8月2日 由 Amon

第一步:编译安装Libmcrypt

下载:http://sourceforge.net/projects/mcrypt/files/Libmcrypt/

wget http://downloads.sourceforge.net/project/mcrypt/Libmcrypt/2.5.8/libmcrypt-2.5.8.tar.gz && tar -xzvf libmcrypt-2.5.8.tar.gz && cd libmcrypt-2.5.8
./configure --prefix=/usr/local/libmcrypt
make -j && make install

输出:

...
Libraries have been installed in:
   /usr/local/libmcrypt/lib
...

更新系统动态连接库配置:

echo '/usr/local/libmcrypt/lib' >> /etc/ld.so.conf.d/custom-libs.conf
ldconfig

编译安装完成。

第二步:编译安装MCrypt

下载:http://sourceforge.net/projects/mcrypt/files/MCrypt/

wget http://downloads.sourceforge.net/project/mcrypt/MCrypt/2.6.8/mcrypt-2.6.8.tar.gz && tar -xzvf mcrypt-2.6.8.tar.gz && cd mcrypt-2.6.8
./configure --prefix=/usr/local/mcrypt --with-libmcrypt=/usr/local/libmcrypt/lib
make -j && make install

输出:

...
rors.o bits.o openpgp.o rndwin32.o environ.o getpass.o ufc_crypt.o popen.o class                                                                                                                     ic.o rfc2440.o gaaout.o   -lz  -lmhash -L/usr/local/lib -lmcrypt
libtool: link: gcc -g -O2 -I/usr/local/include -Wall -o mcrypt extra.o mcrypt.o                                                                                                                      keys.o random.o rndunix.o xmalloc.o functions.o errors.o bits.o openpgp.o rndwin                                                                                                                     32.o environ.o getpass.o ufc_crypt.o popen.o classic.o rfc2440.o gaaout.o  -lz /                                                                                                                     usr/local/lib/libmhash.so -L/usr/local/lib /usr/local/lib/libmcrypt.so
...

更新系统动态连接库配置:

ldconfig

编译安装完成。

广告位
美团云

评论已关闭.