关于laravel:解决-composer-安装-laravel-报错

54次阅读

共计 924 个字符,预计需要花费 3 分钟才能阅读完成。

执行

composer create-project laravel/laravel laravel9

报错

Creating a "laravel/laravel" project at "./laravel9"
Installing laravel/laravel (v10.2.1)
  - Downloading laravel/laravel (v10.2.1)
  - Installing laravel/laravel (v10.2.1): Extracting archive
Created project in /Users/xuweidong/www/laravel9
> @php -r "file_exists('.env') || copy('.env.example','.env');"
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - laravel/framework[v10.10.0, ..., v10.10.1] require doctrine/inflector ^2.0.5 -> found doctrine/inflector[2.0.x-dev, 2.1.x-dev] but it does not match your minimum-stability.
    - Root composer.json requires laravel/framework ^10.10 -> satisfiable by laravel/framework[v10.10.0, v10.10.1].

解决办法:解除镜像

查看镜像源

composer config -l -g

[repositories.packagist.org.type] composer
[repositories.packagist.org.url] https://mirrors.aliyun.com/composer/

解除镜象:并复原到 packagist 官网源

composer config -g --unset repos.packagist

胜利装置

正文完
 0