通过作曲家安装Laravel

时间:2015-05-25 13:45:13

标签: php laravel composer-php laravel-5

当我尝试运行以下内容时(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,但没有帮助。

我的机器很新,到目前为止我还没有完成任何作曲。

如何解决这个问题?

2 个答案:

答案 0 :(得分:3)

对于遇到此问题的人,请参阅:https://github.com/laravel/lumen-installer/issues/2

归功于moraleslevi

“为了它的价值,删除.composer / vendor / guzzlehttp文件夹并重新安装laravel安装程序。”

答案 1 :(得分:0)

首先尝试清除使用composer运行的作曲家缓存

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