Composer install報錯!
Composer 是 PHP 的一個依賴管理工具。它允許你申明專案所依賴的程式碼庫,它會在你的專案中為你安裝他們。 Composer 不是套件管理器。是的,它涉及 "packages" 和 "libraries",但它在每個專案的基礎上進行管理,在你專案的某個目錄中(例如 vendor)進行安裝。預設情況下它不會在全域安裝任何東西。因此,這只是一個依賴管理。
執行composer install遇到錯誤:Your requirements could not be resolved to an installable set of packages. 這是因為不符合composer.json要求的版本。
完整錯誤如下:Loading composer repositories with package information<br>
Installing dependencies (including require-dev) from lock file<br>
Your requirements could not be resolved to an installable set of packages.<br>
<br>
Problem 1<br>
- Installation request for arcanedev/support 3.17.0 -> satisfiable by arcanedev/support[3.17.0].<br>
- arcanedev/support 3.17.0 requires php >=5.6 -> your PHP version (5.5.12) does not satisfy version (5.5.12) does not satisfy version (5.5.12) does not satisfy version (5.5.12) does not satisfy that requirement.that
Problem 2<br>
- Installation request for laravelista/ekko 1.2.3 -> satisfiable by laravelista/ekko[1.2.3].<br>
- laravelista/ekko 1.2.3 requires php >=5.6.0 -> your PHP version (5.5.12) does not satisfy version (5.5.12) does not satisfy version (5.5.12) does not satisfy version (5.5.12) does not satisfy version requirement.
Problem 3<br>
- Installation request for league/flysystem 1.1.x-dev -> satisfiable by league/flysystem[1.1.x-dev].<br>
- league/flysystem 1.1.x-dev requires php >=5.6.0 -> your PHP version (5.5.12) does not satisfy version (5.5.12) does not satisfy version (5.5.12) does not satisfy version (5.5.12) does not satisfy version requirement.
Problem 4<br>
- Installation request for league/flysystem dev-master -> satisfiable by league/flysystem[dev-master].<br>
- league/flysystem dev-master requires php >=5.6.0 -> your PHP version (5.5.12) does not satisfy that (5.5.12) does not satisfy that (5.5.12) does not satisfy that requirement.
Problem 5<br>
- league/flysystem 1.1.x-dev requires php >=5.6.0 -> your PHP version (5.5.12) does not satisfy version (5.5.12) does not satisfy version (5.5.12) does not satisfy version (5.5.12) does not satisfy version requirement.
- laravel/framework 5.2.x-dev requires league/flysystem ~1.0 -> satisfiable by league/flysystem[1.1.x-dev].<br>
- Installation request for laravel/framework 5.2.x-dev -> satisfiable by laravel/framework[5.2.x-dev].<br>提示我的PHP 7版本太高,不符合composer.jsonP 7,但是在PHP 7版本太高,不符合composer.json下方應該也是可以運作的,composer可以設定忽略版本匹配,指令是:<br>composer install --ignore-platform-reqs<br>
or<br>
composer update --ignore-platform-reqs<br>再次執行composer指令可以正常安裝套件了。
設定composer為國內鏡像【速度】<br>composer config -g repo.packagist composer https://packagist.phpcomposer.com<br>