安装带有composer的Laravel Envoy时出现的问题



当我尝试安装laravel特使并运行以下命令时:

composer global要求"laravel/特使=~1.0"

我在终端收到了这个答案:

Your requirements could not be resolved to an installable set of packages.
  Problem 1
    - Conclusion: don't install laravel/envoy v1.1.0
    - Conclusion: don't install laravel/envoy v1.0.27
    - Conclusion: don't install laravel/envoy v1.0.26
    - Conclusion: don't install laravel/envoy v1.0.25
    - Conclusion: don't install laravel/envoy v1.0.24
    - Conclusion: don't install laravel/envoy v1.0.23
    - Conclusion: don't install laravel/envoy v1.0.22
    - Conclusion: don't install laravel/envoy v1.0.21
    - Conclusion: don't install laravel/envoy v1.0.20
    - Conclusion: don't install laravel/envoy v1.0.19
    - Conclusion: don't install laravel/envoy v1.0.18
    - Conclusion: don't install laravel/envoy v1.0.17
    - Conclusion: don't install laravel/envoy v1.0.16
    - Conclusion: don't install laravel/envoy v1.0.15
    - Conclusion: don't install laravel/envoy v1.0.14
    - Conclusion: don't install laravel/envoy v1.0.13
    - Conclusion: don't install laravel/envoy v1.0.12
    - Conclusion: don't install laravel/envoy v1.0.11
    - Conclusion: don't install laravel/envoy 1.0.5
    - Conclusion: don't install laravel/envoy 1.0.3
    - Conclusion: don't install laravel/envoy 1.0.2
    - Conclusion: remove symfony/process v3.0.4
    - Installation request for laravel/envoy ~1.0 -> satisfiable by laravel/envoy[1.0.0, 1.0.2, 1.0.3, 1.0.5, v1.0.11, v1.0.12, v1.0.13, v1.0.14, v1.0.15, v1.0.16, v1.0.17, v1.0.18, v1.0.19, v1.0.20, v1.0.21, v1.0.22, v1.0.23, v1.0.24, v1.0.25, v1.0.26, v1.0.27, v1.1.0].
    - Conclusion: don't install symfony/process v3.0.4
    - laravel/envoy 1.0.0 requires symfony/process 2.4.* -> satisfiable by symfony/process[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].
    - Can only install one of: symfony/process[v2.4.0, v3.0.4].
    - Can only install one of: symfony/process[v2.4.1, v3.0.4].
    - Can only install one of: symfony/process[v2.4.10, v3.0.4].
    - Can only install one of: symfony/process[v2.4.2, v3.0.4].
    - Can only install one of: symfony/process[v2.4.3, v3.0.4].
    - Can only install one of: symfony/process[v2.4.4, v3.0.4].
    - Can only install one of: symfony/process[v2.4.5, v3.0.4].
    - Can only install one of: symfony/process[v2.4.6, v3.0.4].
    - Can only install one of: symfony/process[v2.4.7, v3.0.4].
    - Can only install one of: symfony/process[v2.4.8, v3.0.4].
    - Can only install one of: symfony/process[v2.4.9, v3.0.4].
    - Installation request for symfony/process == 3.0.4.0 -> satisfiable by symfony/process[v3.0.4].

~/.composer:中的我的composer.json文件

{
    "require": {
        "laravel/installer": "^1.3"
    }
}

我正在使用Laravel 5.2。

我找到了这个问题的解决方案。

这个问题的存在是因为Laravel 5.2需要symfony/process 2.8.*|3.0.*,Envoy需要symfony/process 2.4.*,并且当您使用更高的symfony-process版本时,为了实现版本的差异,它会遇到一些麻烦。

解决方案:

在~/.composer:中打开composer.json文件

$ vi ~/.composer/composer.json

它应该是这样的:

{
        "require": {
            "laravel/installer": "^1.3"
        }
    }

更改为:

{
    "require": {
        "laravel/envoy": "~1.0",
        "laravel/installer": "^1.3"
       }
}

现在使用:

$ composer global require "laravel/envoy=~1.0"

别忘了从$PATH 中提供作曲家别名

composer global require laravel/envoy

您可能需要(如果还没有)将全局composer目录添加到$PATH中
将此行添加到您的~/.bash_profile~/.bashrc中。

export PATH="$HOME/.composer/vendor/bin:$PATH" 

相关内容

  • 没有找到相关文章

最新更新