日历存档: 2019 年 7 月 16 日

php 7.3.7安装Mcrypt扩展

分类:网站技术日期:2019-07-16 - 21:45:17评论:4条作者:老谢

  又是闲来无事,把php 5.x升到了7.3.7,升级后明显感觉wp后台快多了,但是用tiny tiny rss的时候报错没有mcrypt函数,经过一番搜索,由于php7已经将此扩展移除到pecl,虽然不知道pecl是个啥,但目前要用到的mcrypt就需要手动安装了,顺手记录一下。

Autoconf的版本

  rpm -qf /usr/bin/autoconf,如果低于2.68则需要升级,否则后面无法编译Mcrypt。

rpm -qf /usr/bin/autoconf
rpm -e --nodeps autoconf-2.63
 
wget ftp://ftp.gnu.org/gnu/autoconf/autoconf-2.68.tar.gz
tar zxvf autoconf-2.68.tar.gz
cd autoconf-2.68
./configure --prefix=/usr/
make && make install
 
[root@laoxie mcrypt-1.0.1]# /usr/bin/autoconf -V
autoconf (GNU Autoconf) 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+/Autoconf: GNU GPL version 3 or later
<http://gnu.org/licenses/gpl.html>, <http://gnu.org/licenses/exceptions.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
 
Written by David J. MacKenzie and Akim Demaille.
开始搞Mcrypt
wget  http://pecl.php.net/get/mcrypt-1.0.1.tgz
tar xf mcrypt-1.0.1.tgz
cd mcrypt-1.0.1
/usr/local/php/bin/phpize
./configure --with-php-config=/usr/local/php/bin/php-config  && make && make install

  编译完编辑php.ini,添加extension=mcrypt.so,然后重启php-fpm即可。

Tags: