php 5.6.36 安装mcrypt

相关扩展安装步骤

libmcrypt

downloadUrl:https://sourceforge.net/projects/mcrypt/files/MCrypt/

versionCode:2.5.8

./configure

make

make install

mhash(libmhash)

downloadUrl:https://sourceforge.net/projects/mhash/files/mhash/

versionCode:0.9.9.9

./configure

make

make install

mcrypt

downloadUrl:https://sourceforge.net/projects/mcrypt/files/Libmcrypt/

versionCode:2.6.8

./configure 

# configure: error: *** libmcrypt was not found

./configure LD_LIBRARY_PATH=/usr/local/lib

# configure: error: "You need at least libmhash 0.8.15 to compile this program. http://mhash.sf.net/"  必须先安装libhash

 make

make install

mcrypt -v # 检测是否安装成功

php

downloadUrl:https://www.php.net/releases/index.php

version:5.6.36

cd ./php-5.6.36/ext/mcrypt

# phpize是一个shell脚本,用于生成PECL扩展的configure文件

# 默认在/path/to/php/bin
phpize

./configure

make

make install

# Installing shared extensions:     /usr/local/php/lib/php/extensions/no-debug-non-zts-20131226/

php --ini #获取php.ini地址

vi php.ini
extension=mcrypt.so

# 检查是否安装成功 
php -m | grep mcrypt
: mcrypt

参考文章 https://segmentfault.com/a/1190000014650797

posted @ 2019-08-21 17:42  传VV说  阅读(1162)  评论(0编辑  收藏  举报