【问题标题】:Laravel installation via composer通过作曲家安装 Laravel
【发布时间】:2015-05-25 13:45:12
【问题描述】:

当我尝试运行以下命令时(Mac OS X Yosemite):

↦ composer global require "laravel/installer=~1.1"

我收到以下错误:

Changed current directory to /Users/USER/.composer
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - laravel/installer v1.1.0 requires guzzlehttp/guzzle ~4.0 -> satisfiable by guzzlehttp/guzzle[4.0.0, 4.0.1, 4.0.2, 4.1.0, 4.1.1, 4.1.2, 4.1.3, 4.1.4, 4.1.5, 4.1.6, 4.1.7, 4.1.8, 4.2.0, 4.2.1, 4.2.2, 4.2.3].
    - laravel/installer v1.1.1 requires guzzlehttp/guzzle ~4.0 -> satisfiable by guzzlehttp/guzzle[4.0.0, 4.0.1, 4.0.2, 4.1.0, 4.1.1, 4.1.2, 4.1.3, 4.1.4, 4.1.5, 4.1.6, 4.1.7, 4.1.8, 4.2.0, 4.2.1, 4.2.2, 4.2.3].
    - laravel/installer v1.1.2 requires guzzlehttp/guzzle ~4.0 -> satisfiable by guzzlehttp/guzzle[4.0.0, 4.0.1, 4.0.2, 4.1.0, 4.1.1, 4.1.2, 4.1.3, 4.1.4, 4.1.5, 4.1.6, 4.1.7, 4.1.8, 4.2.0, 4.2.1, 4.2.2, 4.2.3].
    - laravel/installer v1.1.3 requires guzzlehttp/guzzle ~4.0 -> satisfiable by guzzlehttp/guzzle[4.0.0, 4.0.1, 4.0.2, 4.1.0, 4.1.1, 4.1.2, 4.1.3, 4.1.4, 4.1.5, 4.1.6, 4.1.7, 4.1.8, 4.2.0, 4.2.1, 4.2.2, 4.2.3].
    - laravel/installer v1.2.0 requires guzzlehttp/guzzle ~4.0 -> satisfiable by guzzlehttp/guzzle[4.0.0, 4.0.1, 4.0.2, 4.1.0, 4.1.1, 4.1.2, 4.1.3, 4.1.4, 4.1.5, 4.1.6, 4.1.7, 4.1.8, 4.2.0, 4.2.1, 4.2.2, 4.2.3].
    - guzzlehttp/guzzle 4.2.3 requires guzzlehttp/streams ~2.1 -> no matching package found.
    - guzzlehttp/guzzle 4.2.2 requires guzzlehttp/streams ~2.1 -> no matching package found.
    - guzzlehttp/guzzle 4.2.1 requires guzzlehttp/streams ~2.1 -> no matching package found.
    - guzzlehttp/guzzle 4.2.0 requires guzzlehttp/streams ~2.1 -> no matching package found.
    - guzzlehttp/guzzle 4.1.8 requires guzzlehttp/streams ~1.4 -> no matching package found.
    - guzzlehttp/guzzle 4.1.7 requires guzzlehttp/streams ~1.4 -> no matching package found.
    - guzzlehttp/guzzle 4.1.6 requires guzzlehttp/streams ~1.4 -> no matching package found.
    - guzzlehttp/guzzle 4.1.5 requires guzzlehttp/streams ~1.4 -> no matching package found.
    - guzzlehttp/guzzle 4.1.4 requires guzzlehttp/streams ~1.4 -> no matching package found.
    - guzzlehttp/guzzle 4.1.3 requires guzzlehttp/streams ~1.3 -> no matching package found.
    - guzzlehttp/guzzle 4.1.2 requires guzzlehttp/streams ~1.0 -> no matching package found.
    - guzzlehttp/guzzle 4.1.1 requires guzzlehttp/streams ~1.0 -> no matching package found.
    - guzzlehttp/guzzle 4.1.0 requires guzzlehttp/streams ~1.0 -> no matching package found.
    - guzzlehttp/guzzle 4.0.2 requires guzzlehttp/streams ~1.0 -> no matching package found.
    - guzzlehttp/guzzle 4.0.1 requires guzzlehttp/streams ~1.0 -> no matching package found.
    - guzzlehttp/guzzle 4.0.0 requires guzzlehttp/streams 1.* -> no matching package found.
    - Installation request for laravel/installer ~1.1 -> satisfiable by laravel/installer[v1.1.0, v1.1.1, v1.1.2, v1.1.3, v1.2.0].

Potential causes:
 - A typo in the package name
 - The package is not available in a stable-enough version according to your minimum-stability setting
   see <https://groups.google.com/d/topic/composer-dev/_g3ASeIFlrc/discussion> for more details.

Read <https://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.

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

我全局安装的只有:

{
    "require": {
        "laravel/lumen-installer": "~1.0"
    }
}

我尝试过全局要求 guzzlehttp/streams,也尝试过要求最新版本的 laravel,但无济于事。

我的机器很新,直到现在我还没有做过任何作曲家。

我该如何解决这个问题?

【问题讨论】:

    标签: php laravel composer-php laravel-5


    【解决方案1】:

    遇到此问题的用户请参阅:https://github.com/laravel/lumen-installer/issues/2

    归功于moraleslevi

    “无论如何,删除 .composer/vendor/guzzlehttp 文件夹并重新安装 laravel 安装程序是可行的。”

    【讨论】:

    • 你节省了我的时间!非常感谢!
    【解决方案2】:

    先尝试清除composer缓存使用composer运行

    composer clearcache 
    composer clear-cache
    rm -rf ~/.composer/cache*
    

    【讨论】:

    • 您好用户,我刚刚尝试过,但出现了同样的错误。
    猜你喜欢
    • 2013-12-25
    • 2013-07-10
    • 2019-12-26
    • 2018-02-13
    • 2019-03-05
    • 2014-10-28
    • 2016-02-21
    相关资源
    最近更新 更多