2015-07-04 129 views
1

我想照亮/路由添加到我的流明项目,但每当我试图通过作曲家安装它,下面的错误被抛出照亮/路由:无法安装,因为依赖

$ composer require illuminate/routing Using version ^5.1 for illuminate/routing ./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 
    - The requested package laravel/lumen-framework == 5.0.10.0 could not be found. Problem 2 
    - Installation request for illuminate/contracts == 5.0.33.0 -> satisfiable by illuminate/contracts[v5.0.33]. 
    - illuminate/routing v5.1.1 requires illuminate/contracts 5.1.* -> satisfiable by illuminate/contracts[v5.1.1]. 
    - illuminate/routing v5.1.2 requires illuminate/contracts 5.1.* -> satisfiable by illuminate/contracts[v5.1.1]. 
    - Conclusion: don't install illuminate/contracts v5.1.1 
    - Installation request for illuminate/routing ^5.1 -> satisfiable by illuminate/routing[v5.1.1, v5.1.2]. 

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. 

所以我一直在试图要求合同,虽然几乎相同的错误被抛出告诉我一个更新版本的照明/支持是必需的

反正我真的不知道该怎么做了,我不能看到我的选择是什么。

这里是我的composer.json:

{ 
    "name": "laravel/lumen", 
     "description": "The Laravel Lumen Framework.", 
     "keywords": ["framework", "laravel", "lumen"], 
     "license": "MIT", 
     "type": "project", 
     "require": { 

      "laravel/lumen-framework": "5.1.*", 
      "vlucas/phpdotenv": "~1.0", 
      "tymon/jwt-auth": "^0.5.4", 
     "basicit/lumen-vendor-publish": "^1.0", 
     "illuminate/routing": "4" 
     }, 
     "require-dev": { 
      "phpunit/phpunit": "~4.0" 
     }, 
     "autoload": { 
      "psr-4": { 
       "App\\": "app/" 
      }, 
      "classmap": [ 
       "database/" 
       ], 
      "files": [ 
       "app/helpers.php" 
       ] 
     }, 
     "autoload-dev": { 
      "classmap": [ 
       "tests/" 
       ] 
     }, 
     "config": { 
      "minimum-stability": "dev", 
      "prefer-stable": true 
     } 
} 

你有我应该做的任何想法?从composer.json

+0

得到了同样的问题。你解决了吗? – ngakak

回答

1

降:

"config": { 
    "minimum-stability": "dev", 
    "prefer-stable": true 
} 

你其实并不需要任何东西,因为你不依赖于任何不稳定的包(这就是他们使用什么)。

当我这样做,删除/vendor目录并运行composer install,包安装正确。