Laravel,作曲家安装,不要安装 laravel/framework
Posted
技术标签:
【中文标题】Laravel,作曲家安装,不要安装 laravel/framework【英文标题】:Laravel, composer install, don't install laravel/framework 【发布时间】:2017-05-22 05:41:17 【问题描述】:需要 Laravel 专家帮助我找出我的 composer.json 配置有什么问题。我在谷歌上搜索答案并继续跟进,我检查了每一条可能的线路,我仍然可以让它工作。我从 git repo 获得了这些文件,它在办公室工作,但是当我尝试在家里做同样的事情时,这发生了。
我得到的错误是:
Problem 1
- Conclusion: don't install laravel/framework v5.1.45
- Conclusion: don't install laravel/framework v5.1.44
- Conclusion: don't install laravel/framework v5.1.43
- Conclusion: don't install laravel/framework v5.1.42
- Conclusion: don't install laravel/framework v5.1.41
- Conclusion: don't install laravel/framework v5.1.40
- Conclusion: don't install laravel/framework v5.1.39
- Conclusion: don't install laravel/framework v5.1.38
- Conclusion: don't install laravel/framework v5.1.37
- Conclusion: don't install laravel/framework v5.1.36
- Conclusion: don't install laravel/framework v5.1.35
- Conclusion: don't install laravel/framework v5.1.34
- Conclusion: don't install laravel/framework v5.1.33
- Conclusion: don't install laravel/framework v5.1.32
- Conclusion: don't install laravel/framework v5.1.31
- Conclusion: don't install laravel/framework v5.1.30
- Conclusion: don't install laravel/framework v5.1.29
- Conclusion: don't install laravel/framework v5.1.28
- Conclusion: don't install laravel/framework v5.1.27
- Conclusion: don't install laravel/framework v5.1.26
- Conclusion: don't install laravel/framework v5.1.25
- Conclusion: don't install laravel/framework v5.1.24
- Conclusion: don't install laravel/framework v5.1.23
- Conclusion: don't install laravel/framework v5.1.22
- Conclusion: don't install laravel/framework v5.1.21
- Conclusion: don't install laravel/framework v5.1.20
- Conclusion: don't install laravel/framework v5.1.19
- Conclusion: don't install laravel/framework v5.1.18
- Conclusion: don't install laravel/framework v5.1.17
- Conclusion: don't install laravel/framework v5.1.16
- Conclusion: don't install laravel/framework v5.1.15
- Conclusion: don't install laravel/framework v5.1.14
- Conclusion: don't install laravel/framework v5.1.13
- Conclusion: don't install laravel/framework v5.1.12
- Conclusion: don't install laravel/framework v5.1.11
- Conclusion: don't install laravel/framework v5.1.10
- Conclusion: don't install laravel/framework v5.1.9
- Conclusion: don't install laravel/framework v5.1.8
- Conclusion: don't install laravel/framework v5.1.7
- Conclusion: don't install laravel/framework v5.1.6
- Conclusion: don't install laravel/framework v5.1.5
- Conclusion: don't install laravel/framework v5.1.4
- Conclusion: don't install laravel/framework v5.1.3
- Installation request for orangehill/iseed dev-master -> satisfiable by orangehill/iseed[dev-master].
- Conclusion: don't install laravel/framework v5.1.2
- Conclusion: don't install laravel/framework v5.1.1
- orangehill/iseed dev-master requires illuminate/support ~5.3.8 -> satisfiable by illuminate/support[v5.3.16, v5.3.23].
- don't install illuminate/support v5.3.16|don't install laravel/framework v5.1.0
- don't install illuminate/support v5.3.23|don't install laravel/framework v5.1.0
- Installation request for laravel/framework 5.1.* -> satisfiable by laravel/framework[v5.1.0, v5.1.1, v5.1.10, v5.1.11, v5.1.12, v5.1.13, v5.1.14, v5.1.15, v5.1.16, v5.1.17, v5.1.18, v5.1.19, v5.1.2, v5.1.20, v5.1.21, v5.1.22, v5.1.23, v5.1.24, v5.1.25, v5.1.26, v5.1.27, v5.1.28, v5.1.29, v5.1.3, v5.1.30, v5.1.31, v5.1.32, v5.1.33, v5.1.34, v5.1.35, v5.1.36, v5.1.37, v5.1.38, v5.1.39, v5.1.4, v5.1.40, v5.1.41, v5.1.42, v5.1.43, v5.1.44, v5.1.45, v5.1.5, v5.1.6, v5.1.7, v5.1.8, v5.1.9].
这是我的 composer.json:
"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"type": "project",
"require":
"php": ">=5.5.9",
"laravel/framework": "5.1.*",
"barryvdh/laravel-debugbar": "^2.0",
"intervention/image": "^2.3",
"laracasts/flash": "~1.3",
"laravelcollective/html": "5.1.*",
"cviebrock/eloquent-sluggable": "^3.1",
"kyslik/column-sortable": "~5.0.0",
"propaganistas/laravel-phone": "~2.0",
"mcamara/laravel-localization": "1.0.*",
"caouecs/laravel-lang": "~3.0",
"dimsav/laravel-translatable": "^6.0",
"doctrine/dbal": "^2.5",
"barryvdh/laravel-translation-manager": "0.2.3",
"maatwebsite/excel": "~2.1.0"
,
"require-dev":
"fzaninotto/faker": "~1.4",
"mockery/mockery": "0.9.*",
"phpunit/phpunit": "~4.0",
"phpspec/phpspec": "~2.1",
"orangehill/iseed": "dev-master"
,
"autoload":
"classmap": [
"database"
],
"psr-4":
"App\\": "app/"
,
"files" : [
"app/Helpers/helpers.php"
]
,
"autoload-dev":
"classmap": [
"tests/TestCase.php"
]
,
"scripts":
"post-root-package-install": [
"php -r \"copy('.env.example', '.env');\""
],
"post-create-project-cmd": [
"php artisan key:generate"
],
"post-install-cmd": [
"Illuminate\\Foundation\\ComposerScripts::postInstall",
"php artisan optimize"
],
"post-update-cmd": [
"Illuminate\\Foundation\\ComposerScripts::postUpdate",
"php artisan optimize"
]
,
"config":
"preferred-install": "dist"
【问题讨论】:
结论:不要安装 laravel/framework ☺ 【参考方案1】:如果您想使用 Laravel 6 或更高版本,只需从 compose.json 中删除此依赖项
laravelcollective/html
然后在终端中运行 composer update
composer update
【讨论】:
这一切都需要,错误信息可能已经提到了【参考方案2】:更新 composer.json
文件以安装最新的 Laravel 版本。您还需要为此更新 php 版本。
"laravel/framework": "5.3.*",
"php": ">=5.6.4",
更新
因为你不想安装最新的 Laravel 版本。来自错误日志 -
orangehill/iseed dev-master 需要照明/支持 ~5.3.8
这是在require-dev
下。因此,您尝试composer install --no-dev
,它不会在require-dev
下安装插件。这些插件主要用于应用程序测试。
【讨论】:
我无法安装 5.3,因为我的应用程序会崩溃,需要几天时间才能将其配置为 5.3 :( @RadomirAntic 更新了答案。请检查 感谢 Saumini,我实际上删除了 orangehill/iseed 包,现在它可以工作了。【参考方案3】:如果您使用较低版本的 laravel,例如 5.7.2,并且您的包需要 5.7.7 然后试试这个:
composer require laravel/framework
【讨论】:
请分享更多详细信息 -laravel/framework
已列在所需的软件包集中。再次要求它不会解决给定的错误消息【参考方案4】:
如果你之前没有安装过包,package.json 文件和 composer 插件需要 composer install 命令,而不是 composer update 命令。
composer install
【讨论】:
你能进一步解释一下吗?我不明白你的回答与问题有什么关系 根据这里的问题,用户更换了电脑,如果package.json文件中的包从未安装在新电脑上,则意味着''composer update''命令会返回问题中出现的错误。因此,有必要运行“composer install”而不是“composer update”。【参考方案5】:错误信息很清楚,相关行是:
- Installation request for orangehill/iseed dev-master -> satisfiable by orangehill/iseed[dev-master].
- Conclusion: don't install laravel/framework v5.1.2
- Conclusion: don't install laravel/framework v5.1.1
- orangehill/iseed dev-master requires illuminate/support ~5.3.8 -> satisfiable by illuminate/support[v5.3.16, v5.3.23].
包 orangehill/iseed
需要 Laravel v5.3,但您的 composer.json
配置为使用 Laravel v5.1。升级您的应用程序以使其可以使用 Laravel v5.3,或者使用与 Laravel v5.1 兼容的任何旧版 orangehill/iseed
【讨论】:
以上是关于Laravel,作曲家安装,不要安装 laravel/framework的主要内容,如果未能解决你的问题,请参考以下文章