更新时间:2023-11-16 23:44:34
解决方案1 -将ext-zip添加到composer.json的必需部分:
Solution #1 - add ext-zip to your required section of composer.json:
{
"require" : {
"ext-zip": "*"
}
}
解决方案2 -安装php-zip扩展名:
Solution #2 - install php-zip extension:
Windows:
在您的php.ini中取消注释此行
Uncomment this line in your php.ini
; extension = php_zip.dll
;extension=php_zip.dll
Linux:
sudo apt-get install php-zip
sudo apt-get install php-zip
或
sudo apt-get install php7.0-zip(确保输入了您的php版本,您可以通过执行php -v命令来检查您的版本)
sudo apt-get install php7.0-zip (make sure you typed YOUR php version, you can check your version by doing php -v command)
然后,您需要重新启动Web服务器.
Then, you need to restart your web server.
sudo服务apache2重新启动
sudo service apache2 restart