### 切换阿里镜像
```
composer config -g repo.packagist composer https://mirrors.aliyun.com/composer/
```
2.composer切换 阿里镜像 原文地址 https://developer.aliyun.com/composer
全局配置 :composer config -g repo.packagist composer https://mirrors.aliyun.com/composer/
composer config -gl 查看全局配置
\[repositories.packagist.org.url\] https://mirrors.aliyun.com/composer/ --成功
3.安装laravel5.6
环境 windows phpstudy8 php7.3.4
以composer来安装laravel 5.6 前提已安装composer
打开cmd-> composer create-project --prefer-dist laravel/laravel=5.6.\* blog
![](https://img.kancloud.cn/2c/df/2cdf85589730941e5db6353213fd72ae_575x244.png)
### 出错原因是 以前的低版本composer 更新时有缓存
composer clearcache
清除缓存OK
```
https://www.cnblogs.com/xfych/p/13446401.html
```