装依赖时 composer 直接报 SSL 证书错误。国内网络下这个提示很常见,原因是连不上 packagist 官方源,换镜像就好。
composer require elasticsearch/elasticsearch
https://repo.packagist.org could not be fully loaded (curl error 60 while downloading https://repo.packagist.org/packages.json: SSL certificate problem:
unable to get local issuer certificate), package information was loaded from the local cache and may be out of date打开composer.json文件
把
"repositories": {
}
替换为
"repositories": {
"packagist": {
"type": "composer",
"url": "https://mirrors.aliyun.com/composer/"
}
}
本文由 admin 创作,采用 知识共享署名4.0 国际许可协议进行许可。
本站文章除注明转载/出处外,均为本站原创或翻译,转载前请务必署名。