composer 安装提示超时

报错提示:

[Composer\Downloader\TransportException]
The "https://repo.packagist.org/packages.json" file could not be downloaded: SSL: Handshake timed out
Failed to enable crypto
failed to open stream: operation failed

尝试更新composer源全局配置

composer config -g repo.packagist composer https://mirrors.aliyun.com/composer/

执行诊断命令,最后还是选择更新了(总不可能适配composer重新搭环境吧)

$ composer diagnose
Checking platform settings: The Windows OneDrive folder is not supported on PHP versions below 7.2.23 and 7.3.10.
Upgrade your PHP (7.2.1) to use this location with Composer.

更新composer

$ composer self-update
Updating to version 2.1.9 (stable channel).
   Downloading (100%)
Use composer self-update --rollback to return to version 1.10.1
上一篇:wordpress提示Updating failed. The response is not a valid JSON response如何解决


下一篇:【亲测解决】SSL_do_handshake() failed SSL: error:1408A0C1/14094418