7
2

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 5 years have passed since last update.

Macでcomposerのコマンドを実行すると"Operation timed out"になる時の対処法

Posted at

Macでcomposer updateしようとした際に

The "https://packagist.org/packages.json" file could not be downloaded: failed to open stream: Operation timed out
Retrying with degraded mode, check https://getcomposer.org/doc/articles/troubleshooting.md#degraded-mode for more info

といったエラーが出てcomposer系のコマンドが実行できない場合がある。

https://github.com/composer/composer/issues/4388#issuecomment-284262091
https://getcomposer.org/doc/articles/troubleshooting.md#operation-timed-out-ipv6-issues-

上記に記載してある様にIPv6の設定が正しくされていないと発生するらしく、
中間証明書を設定などすればいいとの情報もあるが暫定的にIPv6をoffにして対処する方法。

Wi-Fiを利用しているので

  • IPv6を無効にする

networksetup -setv6off Wi-Fi

  • IPv6を有効にする

networksetup -setv6automatic Wi-Fi

一度IPv6を無効にしてcomposer updateなどを実行すればOK。

7
2
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
7
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?