命令行,依次执行:
//汇站网 https://www.huizhanii.com
cd /www/server/php/81/src/ext/fileinfo/
/www/server/php/81/bin/phpize
./configure --with-php-config=/www/server/php/81/bin/php-config
sed -i "s#CFLAGS = -g -O2#CFLAGS = -std=c99 -g#g" Makefile
make && make install
echo "extension=/www/server/php/81/lib/php/extensions/no-debug-non-zts-20210902/fileinfo.so" >> /www/server/php/81/etc/php.ini
echo "extension=/www/server/php/81/lib/php/extensions/no-debug-non-zts-20210902/fileinfo.so" >> /www/server/php/81/etc/php-cli.ini
/etc/init.d/php-fpm-81 restart
即可解决。
转载请注明:汇站网 » 宝塔 PHP8.1 无法安装 fileinfo 拓展解决办法