[英]composer global require laravel/installer
I've tried the first commands from the Laravel documentation我已经尝试了 Laravel 文档中的第一个命令
composer global require laravel/installer composer global 需要 laravel/installer
I got error我有错误
Changed current directory to /Users/bheng/.composer
Using version ^2.0 for laravel/installer
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Conclusion: don't install laravel/installer v2.0.1
- Conclusion: remove guzzlehttp/guzzle 4.2.3
- Installation request for laravel/installer ^2.0 -> satisfiable by laravel/installer[v2.0.0, v2.0.1].
- Conclusion: don't install guzzlehttp/guzzle 4.2.3
- laravel/installer v2.0.0 requires guzzlehttp/guzzle ~6.0 -> satisfiable by guzzlehttp/guzzle[6.0.0, 6.0.1, 6.0.2, 6.1.0, 6.1.1, 6.2.0, 6.2.1, 6.2.2, 6.2.3, 6.3.0, 6.3.1, 6.3.2, 6.3.3].
- Can only install one of: guzzlehttp/guzzle[6.0.0, 4.2.3].
- Can only install one of: guzzlehttp/guzzle[6.0.1, 4.2.3].
- Can only install one of: guzzlehttp/guzzle[6.0.2, 4.2.3].
- Can only install one of: guzzlehttp/guzzle[6.1.0, 4.2.3].
- Can only install one of: guzzlehttp/guzzle[6.1.1, 4.2.3].
- Can only install one of: guzzlehttp/guzzle[6.2.0, 4.2.3].
- Can only install one of: guzzlehttp/guzzle[6.2.1, 4.2.3].
- Can only install one of: guzzlehttp/guzzle[6.2.2, 4.2.3].
- Can only install one of: guzzlehttp/guzzle[6.2.3, 4.2.3].
- Can only install one of: guzzlehttp/guzzle[6.3.0, 4.2.3].
- Can only install one of: guzzlehttp/guzzle[6.3.1, 4.2.3].
- Can only install one of: guzzlehttp/guzzle[6.3.2, 4.2.3].
- Can only install one of: guzzlehttp/guzzle[6.3.3, 4.2.3].
- Installation request for guzzlehttp/guzzle (locked at 4.2.3) -> satisfiable by guzzlehttp/guzzle[4.2.3].
Does anyone know why?有谁知道为什么?
I'm trying to spin out a new Laravel project.我正在尝试创建一个新的 Laravel 项目。
Most likely you need --update-with-all-dependencies
switch:您很可能需要
--update-with-all-dependencies
开关:
composer global require laravel/installer --update-with-all-dependencies
Composer refuses to upgrade package if it will require upgrading already installed dependencies - --update-with-all-dependencies
is for change this behavior and upgrade also all necessary dependencies.如果需要升级已安装的依赖项,Composer 拒绝升级包 -
--update-with-all-dependencies
用于更改此行为并升级所有必要的依赖项。
I solved it 😬我解决了😬
⚡️ Sites composer global remove laravel/installer
Changed current directory to /Users/bheng/.composer
Loading composer repositories with package information
Updating dependencies (including require-dev)
- Removing laravel/installer (v1.4.1)
- Removing symfony/filesystem (v3.3.10)
- Removing guzzlehttp/guzzle (4.2.3)
- Removing guzzlehttp/streams (2.1.0)
- Removing symfony/console (v2.6.6)
- Removing symfony/process (v2.6.6)
Generating autoload files
⚡️ Sites composer global require laravel/installer
Changed current directory to /Users/bheng/.composer
Using version ^2.0 for laravel/installer
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
- Installing symfony/process (v4.2.4)
Loading from cache
- Installing symfony/polyfill-ctype (v1.10.0)
Loading from cache
- Installing symfony/filesystem (v4.2.4)
Downloading: 100%
- Installing symfony/polyfill-mbstring (v1.10.0)
Loading from cache
- Installing symfony/contracts (v1.0.2)
Loading from cache
- Installing symfony/console (v4.2.4)
Loading from cache
- Installing guzzlehttp/promises (v1.3.1)
Loading from cache
- Installing ralouphie/getallheaders (2.0.5)
Loading from cache
- Installing psr/http-message (1.0.1)
Loading from cache
- Installing guzzlehttp/psr7 (1.5.2)
Loading from cache
- Installing guzzlehttp/guzzle (6.3.3)
Loading from cache
- Installing laravel/installer (v2.0.1)
Downloading: 100%
symfony/contracts suggests installing psr/cache (When using the Cache contracts)
symfony/contracts suggests installing psr/container (When using the Service contracts)
symfony/contracts suggests installing symfony/cache-contracts-implementation ()
symfony/contracts suggests installing symfony/service-contracts-implementation ()
symfony/contracts suggests installing symfony/translation-contracts-implementation ()
symfony/console suggests installing psr/log (For using the console logger)
symfony/console suggests installing symfony/event-dispatcher ()
symfony/console suggests installing symfony/lock ()
guzzlehttp/guzzle suggests installing psr/log (Required for using the Log middleware)
Writing lock file
Generating autoload files
⚡️ Sites
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.