Package phpoffice/phpspreadsheet has requirements incompatible with your PH P version, PHP extensions and Composer version: - phpoffice/phpspreadsheet 1.29.0 requires ext-fileinfo * but it is not p resent. - phpoffice/phpspreadsheet 1.29.0 requires ext-zip * but it is not presen t.
提示缺少fileinfo,容易搞定,在扩展里打开
但是zip ZipArchive 还是没
在SSH命令行界面执行以下语句(php7.4的):
cd /www/server/php/74/src/ext/zip/
/www/server/php/74/bin/phpize
./configure --with-php-config=/www/server/php/74/bin/php-config
make && make install
echo "extension = zip.so" >> /www/server/php/74/etc/php.ini
如果是7.3的版本,对应数字改下。记得一行一个命令,分别执行
cd /www/server/php/73/src/ext/zip/ /www/server/php/73/bin/phpize ./configure --with-php-config=/www/server/php/73/bin/php-config make && make install echo "extension = zip.so" >> /www/server/php/73/etc/php.ini
最好要重启下php