Laravel项目安装失败
(2023-08-30 23:50:09)| 分类: PHP-GO |
1、安装项目出现的问题
# 问题代码:
D:\PHPSTUDY\PHPTutorial\WWW\LaravelStudy20211215>composer create-project laravel/laravel=7.25.0 --prefer-dist ./
Creating a "laravel/laravel=7.25.0" project at "./"
https://repo.packagist.org could not be fully loaded (curl error 28 while downloading https://repo.packagist.org/packages.json: Operation timed out after 10005 milliseconds with 0 out of 0 bytes received), package information was loaded from the local cache and may be out of date
[Composer\Downloader\TransportException]
curl error 28 while downloading
https://repo.packagist.org/p2/laravel/laravel.json: Operation timed
out after 30001
0 milliseconds with 0 out of 8447 bytes
received
create-project [-s|--stability STABILITY] [--prefer-source] [--prefer-dist] [--repository REPOSITORY] [--repository-url REPOSITORY-URL] [--add-repository] [--dev] [--no-dev] [--no-custom-installers] [--no-scripts] [--no-progress] [--no-secure-http] [--keep-vcs] [--remove-vcs] [--no-install] [--ignore-platform-req IGNORE-PLATFORM-REQ] [--ignore-platform-reqs] [--ask] [--] [] [] []
1
2
3
4
5
6
7
8
9
10
11
12
[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-nHfwhTQ6-1639668121080)(C:\Users\小胡同学\AppData\Roaming\Typora\typora-user-images\image-20211216155235393.png)]
解决方式:
# 连续运行以下的三行代码之后再重新创建Laravel项目就成功了
composer config -l -g
composer config -g repo.packagist composer https://mirrors.aliyun.com/composer/
composer config -g --unset repos.packagist
————————————————
版权声明:本文为CSDN博主「小六子666666」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/qq_40862118/article/details/121986320
# 问题代码:
D:\PHPSTUDY\PHPTutorial\WWW\LaravelStudy20211215>composer create-project laravel/laravel=7.25.0 --prefer-dist ./
Creating a "laravel/laravel=7.25.0" project at "./"
https://repo.packagist.org could not be fully loaded (curl error 28 while downloading https://repo.packagist.org/packages.json: Operation timed out after 10005 milliseconds with 0 out of 0 bytes received), package information was loaded from the local cache and may be out of date
create-project [-s|--stability STABILITY] [--prefer-source] [--prefer-dist] [--repository REPOSITORY] [--repository-url REPOSITORY-URL] [--add-repository] [--dev] [--no-dev] [--no-custom-installers] [--no-scripts] [--no-progress] [--no-secure-http] [--keep-vcs] [--remove-vcs] [--no-install] [--ignore-platform-req IGNORE-PLATFORM-REQ] [--ignore-platform-reqs] [--ask] [--] [] [] []
[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-nHfwhTQ6-1639668121080)(C:\Users\小胡同学\AppData\Roaming\Typora\typora-user-images\image-20211216155235393.png)]
解决方式:
# 连续运行以下的三行代码之后再重新创建Laravel项目就成功了
composer config -l -g
composer config -g repo.packagist composer https://mirrors.aliyun.com/composer/
composer config -g --unset repos.packagist
————————————————
版权声明:本文为CSDN博主「小六子666666」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/qq_40862118/article/details/121986320

加载中…