错误消息指示来自主 .版本要求可以随之调整:composer.json
"require": {
"php": ">=5.5",
像这样更改版本后,我得到:
Problem 1
- Installation request for classpreloader/classpreloader 2.0.0 -> satisfiable by classpreloader/classpreloader[2.0.0].
- classpreloader/classpreloader 2.0.0 requires php >=5.5.9 -> your PHP version (5.5.6) or "config.platform.php" value does not satisfy that requirement.
Problem 2
- Installation request for laravel/framework v5.1.17 -> satisfiable by laravel/framework[v5.1.17].
- laravel/framework v5.1.17 requires php >=5.5.9 -> your PHP version (5.5.6) or "config.platform.php" value does not satisfy that requirement.
Problem 3
- Installation request for laravelcollective/html v5.1.6 -> satisfiable by laravelcollective/html[v5.1.6].
- laravelcollective/html v5.1.6 requires php >=5.5.9 -> your PHP version (5.5.6) or "config.platform.php" value does not satisfy that requirement.
Problem 4
- laravel/framework v5.1.17 requires php >=5.5.9 -> your PHP version (5.5.6) or "config.platform.php" value does not satisfy that requirement.
- jenssegers/agent v2.1.7 requires illuminate/support ~4.0|~5.0 -> satisfiable by laravel/framework[v5.1.17].
- Installation request for jenssegers/agent v2.1.7 -> satisfiable by jenssegers/agent[v2.1.7].
使用以下代码片段,可以模拟 php 版本composer.json
[...]
"config": {
"preferred-install": "dist",
"platform": {
"php": "5.5.9"
}
}
文档: https://getcomposer.org/doc/06-config.md#platform
平台
允许您伪造平台包(PHP和扩展),以便您可以模拟生产环境或在配置中定义目标平台。示例:{“php”: “5.4”, “ext-something”: “4.0”}.
不要忘记在此之后运行composer.phar update