fileinfo
cd ~/php-7.3.9/ext/fileinfo/
phpize
./configure --with-php-config=/usr/local/php-7.3.9/bin/php-config
make && make install
#打开php.ini添加fileinfo
vim /usr/local/php-7.3.9/etc/php.ini
extension=fileinfo.so
mcrypt
tar -jxf php-7.4.30.tar.bz2
cd php-7.4.30/ext
/usr/local/php/bin/pecl channel-update pecl.php.net
/usr/local/php/bin/pecl download mcrypt || /usr/local/php/bin/pecl download channel://pecl.php.net/mcrypt-1.0.6
tar zxf mcrypt-1.0.6.tgz
cd mcrypt-1.0.6
/usr/local/php/bin/phpize
./configure --with-php-config=/usr/local/php/bin/php-config
make && make install
vim /usr/local/php/etc/php.ini
#打开php.ini添加mcrypt
vim /usr/local/php/etc/php.ini
extension = "mcrypt.so"
记得加完扩展后重启
/etc/init.d/php-fpm restart
// 验证结果
/usr/local/php/bin/php -i | grep ^mcrypt