PHP错误:“缺少zip扩展名和解压缩命令,正在跳过."
问题描述:
当我运行composer update
时,出现以下错误消息:
When I run a composer update
I get this error message:
Loading composer repositories with package information
Updating dependencies (including require-dev)
Failed to download psr/log from dist: The zip extension and unzip command are both missing, skipping.
The php.ini used by your command-line PHP is: /etc/php/7.0/cli/php.ini
Now trying to download from source
我需要做什么才能启用zip和unzip命令,以便作曲家可以下载依赖项?
What do I need to do to enable the zip and unzip commands so that composer can download dependencies?
答
具体取决于您的Linux和PHP版本.
Depending on your flavour of Linux and PHP version these may vary.
(sudo) yum install zip unzip php-zip
(sudo) apt install zip unzip php-zip
这是一个非常常见的问题,您可以通过搜索<distro> php <version> zip extension
在以太坊中找到更多有用的信息.
This is a very commonly asked question, you'll be able to find more useful info in the aether by searching <distro> php <version> zip extension
.