The "https://packagist.laravel-china.org/packages.json" file could not be downloaded: Peer certificate CN=`*.phphub.org' did not match expected CN=`packagist.laravel-china.org'
Failed to enable crypto
failed to open stream: operation failed
https://packagist.laravel-china.org could not be fully loaded, package information was loaded from the local cache and may be out of date
[Composer\Downloader\TransportException]
The "https://packagist.laravel-china.org/p/topthink/think-captcha%243e2f625a37721436fc623c1cf44790ff3efd86044ceb868328a8235ac3941399.json" file could not be downloaded: Peer c
ertificate CN=`*.phphub.org' did not match expected CN=`packagist.laravel-china.org'
Failed to enable crypto
failed to open stream: operation failed
require [--dev] [--prefer-source] [--prefer-dist] [--no-progress] [--no-suggest] [--no-update] [--no-scripts] [--update-no-dev] [--update-with-dependencies] [--update-with-all-depe
ndencies] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [--sort-packages] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--] [<package
s>]...
出现上述错误信息是因为,composer 全局下载换成中国镜像的原因.
只需将下载源换会默认的就可以。可以使用下面命令修改 composer 配置信息
composer config -g repo.packagist composer https://packagist.phpcomposer.com
正常修改过后,再使用 composer 执行之前的操作是没有问题的,如果仍然出现上述错误,是代理上网的问题,可以查找代理上网相关资料设置
4615




被折叠的 条评论
为什么被折叠?



