0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

Composerで[The zip extension and unzip/7z commands are both missing]エラー解消対応 Windows環境

Posted at

Composerでパッケージを入手しようとした場合、zip extensionが見つからないとのエラーが出た時の対処法を説明します。
エラー内容:

Failed to download psr/container from dist: The zip extension and unzip/7z commands are both missing, skipping.                                           
The php.ini used by your command-line PHP is: C:\php\php.ini                   
    Now trying to download from source

image.png

C:\Windows\System32>composer update
Composer could not find a composer.json file in C:\Windows\System32
To initialize a project, please create a composer.json file. See https://getcomposer.org/basic-usage

image.png
パッケージが無いの理由なであるため、update後にもう一度実行すればエラーが解消されない場合、
PHP 設定ファイルから以下のように設定すとなっているかの確認を行ってください。
コメントアウトを外して下記ように設定することで上記エラーの解消となります。

php.ini
extension=zip
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?