Проблемы с установкой Laravel Envoy с композитором

Когда я пытаюсь установить Laravel Envoy и запустить эту команду:

глобальный композитор требует "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.

1 ответ

Я нашел решение этой проблемы.

Эта проблема существует, потому что Laravel 5.2 нуждается в symfony/process 2.8.* | 3.0.* И Envoy требуется symfony/process 2.4.* И когда вы используете более высокую версию symfony / process, он сталкивается с некоторыми проблемами, чтобы понять разницу версий.

Решение:

Откройте файл composer.json в ~/.composer:

$ 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

Возможно, вам потребуется (если еще не) добавить глобальный каталог композитора в $PATH.
Добавьте эту строку в свой~/.bash_profile или ~/.bashrc.

export PATH="$HOME/.composer/vendor/bin:$PATH" 
Другие вопросы по тегам