在部署Laravel 4时,我从未发生这种情况。确切地说,版本是4.0.9。运行composer install
root@server1 [/home/testapp/www]# composer install
Warning: This development build of composer is over 30 days old. It is recommended to update it by running "/usr/local/bin/composer self-update" to get the latest version.
Loading composer repositories with package information
Installing dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Installation request for laravel/framework 4.0.9 -> satisfiable by laravel/framework[v4.0.9].
- way/generators dev-master requires illuminate/support ~5.0 -> satisfiable by laravel/framework[5.0.x-dev], illuminate/support[5.0.x-dev].
- Can only install one of: laravel/framework[v4.0.9, 5.0.x-dev].
- don't install illuminate/support 5.0.x-dev|don't install laravel/framework v4.0.9
- Installation request for way/generators dev-master -> satisfiable by way/generators[dev-master].
有人知道为什么会这样吗?
修改
composer.json
{
"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"require": {
"laravel/framework": "4.0.9",
"way/generators": "dev-master",
"intervention/image": "dev-master",
"facebook/php-sdk": "dev-master"
},
"autoload": {
"classmap": [
"app/commands",
"app/controllers",
"app/models",
"app/database/migrations",
"app/database/seeds",
"app/tests/TestCase.php"
]
},
"scripts": {
"post-install-cmd": [
"php artisan optimize"
],
"pre-update-cmd": [
"php artisan clear-compiled"
],
"post-update-cmd": [
"php artisan optimize"
],
"post-create-project-cmd": [
"php artisan key:generate"
]
},
"config": {
"preferred-install": "dist"
},
"minimum-stability": "dev"
}
答案 0 :(得分:1)
您正在尝试安装dev-master版本的方式/生成器,而这个dev-master需要 阐明版本5.0的支持,因为在安装laravel 4.0.9时,这就是错误即将发生的原因
please replace "way/generators": "dev-master" with this "way/generators": "2.6.1"
你会没事的。
玩得开心;)
答案 1 :(得分:0)
你可以改变:
"way/generators": "dev-master",
到
"way/generators": "~2.0",
没有添加确切的版本号。现在它是2.6.1,但它可以转到2.6.2,如果你手动设置数字,你将获得旧版本。
因为您使用的是版本dev-master
,所以发生了一切。可能dev-master
从版本2更改为3,版本3可能需要Laravel 5。