用作曲家安装Laravel Envoy的问题

时间:2016-04-16 20:29:11

标签: laravel composer-php laravel-5.2 laravel-envoy

当我尝试安装laravel envoy并运行此命令时:

composer global require" laravel / envoy = ~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.json文件在〜/ .composer:

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

我正在使用Laravel 5.2。

2 个答案:

答案 0 :(得分:1)

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

这个问题的存在是因为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"

答案 1 :(得分:0)

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

composer global require laravel/envoy

您可能需要(如果尚未)将全局作曲者目录添加到$ PATH
将此行添加到您的~/.bash_profile~/.bashrc中。

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