通过 Composer 下载 Lumen 时出错

Error downloading Lumen via Composer

我刚刚将我的 Laravel 版本更新到 5.2 并更新了我的作曲家。然后,当我尝试通过作曲家安装 Lumen 时,出现以下错误:

Your requirements could not be resolved to an installable set of packages.

Problem 1 - Conclusion: don't install laravel/lumen-installer v1.0.1 - Conclusion: remove symfony/process v3.0.0 - Installation request for laravel/lumen-installer ^1.0 -> satisfiable by laravel/lumen-installer[v1.0.0, v1.0.1]. - Conclusion: don't install symfony/process v3.0.0 - laravel/lumen-installer v1.0.0 requires symfony/process ~2.3 -> satisfiable by symfony/process[v2.3.0, v2.3.1, v2.3.10, v2.3.11, v2.3.12, v2.3.13, v2.3.14, v2.3.15, v2.3.16, v2.3.17, v2.3.18, v2.3.19, v2.3.2, v2.3.20, v2.3.21, v2.3.22, v2.3.23, v2.3.24, v2.3.25, v2.3.26, v2.3.27, v2.3.28, v2.3.29, v2.3.3, v2.3.30, v2.3.31, v2.3.32, v2.3.33, v2.3.34, v2.3.35, v2.3.4, v2.3.5, v2.3.6, v2.3.7, v2.3.8, v2.3.9, v2.4.0, v2.4.1, v2.4.10, v2.4.2, v2.4.3, v2.4.4, v2.4.5, v2.4.6, v2.4.7, v2.4.8, v2.4.9, v2.5.0, v2.5.1, v2.5.10, v2.5.11, v2.5.12, v2.5.2, v2.5.3, v2.5.4, v2.5.5, v2.5.6, v2.5.7, v2.5.8, v2.5.9, v2.6.0, v2.6.1, v2.6.10, v2.6.11, v2.6.12, v2.6.2, v2.6.3, v2.6.4, v2.6.5, v2.6.6, v2.6.7, v2.6.8, v2.6.9, v2.7.0, v2.7.1, v2.7.2, v2.7.3, v2.7.4, v2.7.5, v2.7.6, v2.7.7, v2.8.0].

  • Can only install one of: symfony/process[v2.3.0, v3.0.0].
  • Can only install one of: symfony/process[v2.3.1, v3.0.0].
  • ...
  • Installation request for symfony/process == 3.0.0.0 -> satisfiable by symfony/process[v3.0.0].

Installation failed, reverting ./composer.json to its original content.

我只是 运行 我的命令行上的这个命令基于 documentation:

上的说明
composer global require "laravel/lumen-installer=~1.0"

我的猜测是您已经全局添加了一个包,该包使用 symfony/process ~3.0.0 但 Lumen 安装程序需要 symfony/process ~2.3 因此作曲家无法同时安装两者。

您可以尝试通过删除该软件包并全局安装 Lumen 安装程序来自行解决此问题,将安装程序添加到您的工作目录(即省略 global 关键字,您应该可以在该目录)或 Lumen 提供了一种直接安装自身的方法,只需 运行:

composer create-project laravel/lumen YourProjectName --prefer-dist

在您的安装目录中。

正在检查 lumen 安装程序的最新提交 https://github.com/laravel/lumen-installer。似乎最近修复了安装程序依赖项(即 symfony/process ~2.3|~3.0)。

如果您希望尽早使用安装程序,请获取 dev-master 版本 composer global require "laravel/lumen-installer=dev-master" 直到正式发布。否则,您可以等到修复程序正确发布。