我正在尝试安装作曲家和结果
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
- Conclusion: don't install laravel/framework v4.2.17
- Conclusion: don't install illuminate/support v4.2.17
- Conclusion: don't install illuminate/support v5.1.8
- Conclusion: don't install laravel/framework v4.2.16
- Conclusion: don't install illuminate/support v4.2.16
- Conclusion: don't install illuminate/support v5.1.6
- Conclusion: don't install laravel/framework v4.2.15
- Conclusion: don't install illuminate/support v4.2.12
- Conclusion: don't install illuminate/support v5.1.2
- Conclusion: don't install laravel/framework v4.2.14
- Conclusion: don't install illuminate/support v4.2.9
- Conclusion: don't install illuminate/support v5.1.1
- Conclusion: don't install laravel/framework v4.2.13
- Conclusion: don't install illuminate/support v4.2.8
- Conclusion: don't install illuminate/support v5.0.33
- Conclusion: don't install laravel/framework v4.2.12
- Conclusion: don't install illuminate/support v4.2.7
- Conclusion: don't install illuminate/support v5.0.28
- Conclusion: don't install laravel/framework v4.2.11
- Conclusion: don't install illuminate/support v4.2.6
- Conclusion: don't install illuminate/support v5.0.26
- Conclusion: don't install laravel/framework v4.2.10
- Conclusion: don't install illuminate/support v4.2.5
- Conclusion: don't install illuminate/support v5.0.25
- Conclusion: don't install laravel/framework v4.2.9
- Conclusion: don't install illuminate/support v4.2.4
- Conclusion: don't install illuminate/support v5.0.22
- Conclusion: don't install laravel/framework v4.2.8
- Conclusion: don't install illuminate/support v4.2.3
- Installation request for wicochandra/captcha 1.1.1 -> satisfiable by wicochandra/captcha[1.1.1].
- Installation request for latrell/captcha dev-master -> satisfiable by latrell/captcha[dev-master].
- Installation request for laravel/framework 4.2.* -> satisfiable by laravel/framework[v4.2.0, v4.2.1, v4.2.10, v4.2.11, v4.2.12, v4.2.13, v4.2.14, v4.2.15, v4.2.16, v4.2.17, v4.2.2, v4.2.3, v4.2.4, v4.2.5, v4.2.6, v4.2.7, v4.2.8, v4.2.9].
- wicochandra/captcha 1.1.1 requires illuminate/support 4.2.* -> satisfiable by laravel/framework[v4.2.0, v4.2.1, v4.2.10, v4.2.11, v4.2.12, v4.2.13, v4.2.14, v4.2.15, v4.2.16, v4.2.17, v4.2.2, v4.2.3, v4.2.4, v4.2.5, v4.2.6, v4.2.7, v4.2.8, v4.2.9], illuminate/support[v4.2.1, v4.2.12, v4.2.16, v4.2.17, v4.2.2, v4.2.3, v4.2.4, v4.2.5, v4.2.6, v4.2.7, v4.2.8, v4.2.9].
- Can only install one of: illuminate/support[v5.0.0, v4.2.1].
- Can only install one of: illuminate/support[v5.0.0, v4.2.2].
- don't install illuminate/support v5.0.0|don't install laravel/framework v4.2.0
- don't install illuminate/support v5.0.0|don't install laravel/framework v4.2.1
- don't install illuminate/support v5.0.0|don't install laravel/framework v4.2.2
- don't install illuminate/support v5.0.0|don't install laravel/framework v4.2.3
- don't install illuminate/support v5.0.0|don't install laravel/framework v4.2.4
- don't install illuminate/support v5.0.0|don't install laravel/framework v4.2.5
- don't install illuminate/support v5.0.0|don't install laravel/framework v4.2.6
- don't install illuminate/support v5.0.0|don't install laravel/framework v4.2.7
- latrell/captcha dev-master requires illuminate/support 5.* -> satisfiable by illuminate/support[v5.0.0, v5.0.22, v5.0.25, v5.0.26, v5.0.28, v5.0.33, v5.0.4, v5.1.1, v5.1.2, v5.1.6, v5.1.8].
- Conclusion: don't install illuminate/support v5.0.4
和进行更新时
Loading composer repositories with package information
更新依赖项(包括require-dev) 您的要求无法解析为可安装的软件包。
Problem 1
- Conclusion: don't install laravel/framework v4.2.17
- Conclusion: don't install laravel/framework v4.2.16
- Conclusion: don't install laravel/framework v4.2.15
- Conclusion: don't install laravel/framework v4.2.14
- Conclusion: don't install laravel/framework v4.2.13
- Conclusion: don't install laravel/framework v4.2.12
- Conclusion: don't install laravel/framework v4.2.11
- Conclusion: don't install laravel/framework v4.2.10
- Conclusion: don't install laravel/framework v4.2.9
- Conclusion: don't install laravel/framework v4.2.8
- Conclusion: don't install laravel/framework v4.2.7
- Conclusion: don't install laravel/framework v4.2.6
- Conclusion: don't install laravel/framework v4.2.5
- Conclusion: don't install laravel/framework v4.2.4
- Conclusion: don't install laravel/framework v4.2.3
- Installation request for latrell/captcha dev-master -> satisfiable by latrell/captcha[dev-master].
- Conclusion: don't install laravel/framework v4.2.2
- Conclusion: don't install laravel/framework v4.2.1
- latrell/captcha dev-master requires illuminate/support 5.* -> satisfiable by illuminate/support[v5.1.8, v5.0.0, v5.0.22, v5.0.25, v5.0.26, v5.0.28, v5.0.33, v5.0.4, v5.1.1, v5.1.2, v5.1.6].
- don't install laravel/framework v4.2.0|remove illuminate/support v5.1.8
- don't install laravel/framework v4.2.0|don't install illuminate/support v5.1.1
- don't install laravel/framework v4.2.0|don't install illuminate/support v5.1.2
- don't install laravel/framework v4.2.0|don't install illuminate/support v5.1.6
- don't install laravel/framework v4.2.0|don't install illuminate/support v5.1.8
- don't install laravel/framework v4.2.0|don't install illuminate/support v5.0.0
- don't install laravel/framework v4.2.0|don't install illuminate/support v5.0.22
- don't install laravel/framework v4.2.0|don't install illuminate/support v5.0.25
- don't install laravel/framework v4.2.0|don't install illuminate/support v5.0.26
- don't install laravel/framework v4.2.0|don't install illuminate/support v5.0.28
- don't install laravel/framework v4.2.0|don't install illuminate/support v5.0.33
- don't install laravel/framework v4.2.0|don't install illuminate/support v5.0.4
- Installation request for laravel/framework 4.2.* -> satisfiable by laravel/framework[v4.2.0, v4.2.1, v4.2.10, v4.2.11, v4.2.12, v4.2.13, v4.2.14, v4.2.15, v4.2.16, v4.2.17, v4.2.2, v4.2.3, v4.2.4, v4.2.5, v4.2.6, v4.2.7, v4.2.8, v4.2.9].
composer.json
{
"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"require": {
"laravel/framework": "4.2.*",
"way/generators": "~2.0",
"intervention/image": "~1.5",
"latrell/captcha": "dev-master",
"wicochandra/captcha": "1.1.1",
"thujohn/pdf": "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 clear-compiled",
"php artisan optimize"
],
"post-update-cmd": [
"php artisan clear-compiled",
"php artisan optimize"
],
"post-create-project-cmd": [
"php artisan key:generate"
]
},
"config": {
"preferred-install": "dist"
},
"minimum-stability": "stable"
}
答案 0 :(得分:1)
- latrell/captcha dev-master requires illuminate/support 5.*
这是你失败的原因。在尝试同时安装Laravel 4时,您正尝试使用该程序包,这取决于Laravel 5。
我建议你永远不要手动编辑composer.json
,而是运行这个简单的命令行:
composer require latrell/captcha
这将检查packagist.org并为您安装最新的可安装版本。如果它无法安装,它会立即告诉你。
如果您想要特定版本,该命令也将接受版本参数:
composer require latrell/captcha:~1.0
虽然一般来说使用分支是一个非常糟糕的主意,但它们也可以用来代替版本。
它们不好的原因是:您可能曾经将master分支添加到项目中,并且它的过去版本与Laravel 4兼容。但是此分支已更改,现在主分支不兼容。您现在永远无法运行composer update
,因为分支不太可能再次兼容。始终尝试使用标记版本。如果您要使用的软件没有标记的版本:请求维护者标记版本 - 即使alpha稳定性也会有所帮助。如果维护者不想标记版本:保留他们的软件,使用它会比你的项目更长期地损害你的项目。
或者:对项目进行分叉并自行标记软件。但基本上这意味着你接管责任来维护你的分叉,即使它只适用于你的本地开发,也没有其他人。您必须跟踪原始项目的进度 - 否则您最终会得到一个陈旧版本,可能与原始源极不同步,需要花费大量精力再次更新它。
避免使用分支。