PHPStorm告诉我,我需要作曲家需要ext-zip,但是,该命令失败了…
PHPStorm说
我发出的命令是
composer require ext-zip
结果是
Your requirements could not be resolved to an installable set of packages.
和
Installation failed, reverting ./composer.json to its original content.
解决方法:
解决方案#1-将ext-zip添加到composer.json的必需部分:
{
"require" : {
"ext-zip": "*"
}
}
解决方案#2-安装php-zip扩展名:
视窗:
在您的php.ini中取消注释此行
;extension=php_zip.dll
Linux的:
sudo apt-get install php-zip
要么
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服务器.
sudo service apache2 restart