沃梦达 / 编程问答 / php问题 / 正文

PHP 错误:“zip 扩展名和解压缩命令都丢失,正在跳过."

PHP error: quot;The zip extension and unzip command are both missing, skipping.quot;(PHP 错误:“zip 扩展名和解压缩命令都丢失,正在跳过.)

本文介绍了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 命令,以便 composer 可以下载依赖项?

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 <版本>邮编扩展.

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.

这篇关于PHP 错误:“zip 扩展名和解压缩命令都丢失,正在跳过."的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本文标题为:PHP 错误:“zip 扩展名和解压缩命令都丢失,正在跳过."

基础教程推荐