linux php7.2.1 编译安装mcrypt

最近在部署一个第三方消息的时候,发现需要 mcrypt_get_block_size ,因此产生了 mcrypt的编译安装.

cd /usr/tmp
wget http://pecl.php.net/get/mcrypt-1.0.1.tgz 
tar zxvf mcrypt-1.1.1.tgz
cd mcrypt-1.0.1
#原php安装路径
/usr/local/php/bin/phpize
./configure --with-php-config=/usr/local/php/bin/php-config
#报错 configure: error: mcrypt.h not found. Please reinstall libmcrypt.
cd /usr/tmp
wget https://nchc.dl.sourceforge.net/project/mcrypt/Libmcrypt/2.5.8/libmcrypt-2.5.8.tar.gz
tar -zxvf libmcrypt-2.5.8.tar.gz
cd libmcrypt-2.5.8/
./configure 
make && make install
cd /usr/tmp
cd mcrypt-1.0.1
./configure --with-php-config=/usr/local/php/bin/php-config
make && make install
vim /usr/local/php/etc/php.ini 
#添加extension = mcrypt.so
service php-fpm restart

标签: none

非特殊说明,本博所有文章均为博主原创。

最新文章

发表评论