安装 fileinfo 扩展sudo yum install php-fileinfo
作者:野牛程序员:2023-11-24 09:13:54服务器阅读 2637
缺少 PHP 的 fileinfo
扩展导致安装失败。phpoffice/phpspreadsheet
包在其依赖中要求安装 ext-fileinfo
。
For Red Hat-based systems (e.g., CentOS, Fedora):
sudo yum install php-fileinfo
运行结果显示 Loaded plugins: fastestmirror Determining fastest mirrors epel/x86_64/metalink | 6.6 kB 00:00:00 base | 3.6 kB 00:00:00 centos-sclo-rh | 3.0 kB 00:00:00 docker-ce-stable | 3.5 kB 00:00:00 epel | 4.7 kB 00:00:00 extras | 2.9 kB 00:00:00 updates | 2.9 kB 00:00:00 yarn | 2.9 kB 00:00:00 .。。。。。。。 (1/7): docker-ce-stable/x86_64/primary_db | 118 kB 00:00:00 (2/7): epel/x86_64/updateinfo | 1.0 MB 00:00:00 (3/7): epel/x86_64/group_gz | 99 kB 00:00:00 (4/7): extras/7/x86_64/primary_db | 250 kB 00:00:00 (5/7): centos-sclo-rh/x86_64/primary_db | 3.4 MB 00:00:00 (6/7): epel/x86_64/primary_db | 7.0 MB 00:00:00 (7/7): updates/7/x86_64/primary_db | 24 MB 00:00:02 Package php-common-5.4.16-48.el7.x86_64 already installed and latest version Nothing to do
其他系统运行对应的命令
For Debian-based systems (e.g., Debian, Ubuntu):
sudo apt update sudo apt install php-fileinfo
For Alpine Linux:
sudo apk add php-fileinfo
野牛程序员教少儿编程与信息学奥赛-微信|电话:15892516892