Laravel 安装和开发环境:修改项目依赖为新的镜像地址

xiaochang 104 0
composer install
Do not run Composer as root/super user! See https://getcomposer.org/root for details
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Package operations: 32 installs, 0 updates, 0 removals
  - Installing fzaninotto/faker (v1.8.0): Downloading (failed)
Downloading (failed)
Downloading (failed)
 Failed, trying the next URL (0: The "https://dl.laravel-china.org/fzaninotto/faker/f72816b43e74063c8b10357394b6bba8cb1c10de.zip" file could not be downloaded: SSL operation failed with code 1. OpenSSL Error messages:
error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed
Failed to enable crypto
failed to open stream: operation failed)Downloading (5%)^C

原因:2019年7月24日,Laravel China宣布2个月后停用Laravel China中国全量镜像,推荐使用阿里云、腾讯、华为laravel镜像。

解决方案:

 阿里云镜像

1. 配置新镜像

首先配置你的新镜像为全局镜像:

$ composer config repo.packagist composer https://mirrors.aliyun.com/composer/

2. 刷新 composer.lock 文件

使用以下命令:

$ composer update nothing

或者:

$ composer update --lock

发表评论 取消回复
表情 图片 链接 代码

分享