gpt4 book ai didi

php - 您的要求无法解析为一组可安装的软件包。 - 交响乐项目

转载 作者:行者123 更新时间:2023-12-04 15:39:42 25 4
gpt4 key购买 nike

我尝试从我必须维护的项目中安装依赖项,但每次我尝试执行 composer 安装时,我都会收到此错误“无法将您的要求解析为一组可安装的软件包。' 它给了我这个错误:

    Warning: The lock file is not up to date with the latest changes in composer.json. You may be getting outdated dependencies. Run update to update them.
Your requirements could not be resolved to an installable set of packages.

Problem 1
- Installation request for symfony/symfony v3.4.23 -> satisfiable by symfony/symfony[v3.4.23].
- don't install symfony/css-selector v4.2.4|don't install symfony/symfony v3.4.23
- Installation request for symfony/css-selector v4.2.4 -> satisfiable by symfony/css-selector[v4.2.4].

我试过更改 composer.json,执行 composer update --lock、composer install、composer update

在这里,我将 composer.json 与依赖项一起粘贴。

"require": {
"php": ">=7.1",
"ext-json": "*",
"doctrine/doctrine-bundle": "^1.6",
"doctrine/doctrine-migrations-bundle": "^1.0",
"doctrine/orm": "^2.5",
"incenteev/composer-parameter-handler": "^2.0",
"knplabs/knp-snappy-bundle": "^1.5",
"sensio/distribution-bundle": "^5.0.19",
"sensio/framework-extra-bundle": "^3.0.2",
"symfony/monolog-bundle": "^3.1.0",
"symfony/polyfill-apcu": "^1.0",
"symfony/swiftmailer-bundle": "^2.3.10",
"symfony/symfony": "3.4.*",
"twig/twig": "^1.0||^2.0"
},
"require-dev": {
"sensio/generator-bundle": "^3.0",
"symfony/browser-kit": "^4.2",
"symfony/css-selector": "^4.2",
"symfony/phpunit-bridge": "^4.2"
},

由于依赖项之一附带的 autoload.php,我无法启动该应用程序。

我有最后一个 PHP 版本和最后一个 composer 版本。

非常感谢。

PS:尝试删除 composer.lock 并再次执行 composer install 和 composer update,结果如下:

 Problem 1
- Conclusion: don't install symfony/symfony v3.4.31
- Conclusion: don't install symfony/symfony v3.4.30
- Conclusion: don't install symfony/symfony v3.4.29
- Conclusion: don't install symfony/symfony v3.4.28
- Conclusion: don't install symfony/symfony v3.4.27
- Conclusion: don't install symfony/symfony v3.4.26
- Conclusion: don't install symfony/symfony v3.4.25
- Conclusion: don't install symfony/symfony v3.4.24
- Conclusion: don't install symfony/symfony v3.4.23
- Conclusion: don't install symfony/symfony v3.4.22
- Conclusion: don't install symfony/symfony v3.4.21
- Conclusion: don't install symfony/symfony v3.4.20
- Conclusion: don't install symfony/symfony v3.4.19
- Conclusion: don't install symfony/symfony v3.4.18
- Conclusion: don't install symfony/symfony v3.4.17
- Conclusion: don't install symfony/symfony v3.4.16
- Conclusion: don't install symfony/symfony v3.4.15
- Conclusion: don't install symfony/symfony v3.4.14
- Conclusion: don't install symfony/symfony v3.4.13
- Conclusion: don't install symfony/symfony v3.4.12
- Conclusion: don't install symfony/symfony v3.4.11
- Conclusion: don't install symfony/symfony v3.4.10
- Conclusion: don't install symfony/symfony v3.4.9
- Conclusion: don't install symfony/symfony v3.4.8
- Conclusion: don't install symfony/symfony v3.4.7
- Conclusion: don't install symfony/symfony v3.4.6
- Conclusion: don't install symfony/symfony v3.4.5
- Conclusion: don't install symfony/symfony v3.4.4
- Conclusion: don't install symfony/symfony v3.4.3
- Conclusion: don't install symfony/symfony v3.4.2
- Conclusion: don't install symfony/symfony v3.4.1
- don't install symfony/css-selector v4.2.0|don't install symfony/symfony v3.4.0
- don't install symfony/css-selector v4.2.1|don't install symfony/symfony v3.4.0
- don't install symfony/css-selector v4.2.10|don't install symfony/symfony v3.4.0
- don't install symfony/css-selector v4.2.11|don't install symfony/symfony v3.4.0
- don't install symfony/css-selector v4.2.2|don't install symfony/symfony v3.4.0
- don't install symfony/css-selector v4.2.3|don't install symfony/symfony v3.4.0
- don't install symfony/css-selector v4.2.4|don't install symfony/symfony v3.4.0
- don't install symfony/css-selector v4.2.5|don't install symfony/symfony v3.4.0
- don't install symfony/css-selector v4.2.6|don't install symfony/symfony v3.4.0
- don't install symfony/css-selector v4.2.7|don't install symfony/symfony v3.4.0
- don't install symfony/css-selector v4.2.8|don't install symfony/symfony v3.4.0
- don't install symfony/css-selector v4.2.9|don't install symfony/symfony v3.4.0
- don't install symfony/css-selector v4.3.0|don't install symfony/symfony v3.4.0
- don't install symfony/css-selector v4.3.1|don't install symfony/symfony v3.4.0
- don't install symfony/css-selector v4.3.2|don't install symfony/symfony v3.4.0
- don't install symfony/css-selector v4.3.3|don't install symfony/symfony v3.4.0
- don't install symfony/css-selector v4.3.4|don't install symfony/symfony v3.4.0
- Installation request for symfony/symfony 3.4.* -> satisfiable by symfony/symfony[v3.4.0, v3.4.1, v3.4.10, v3.4.11, v3.4.12, v3.4.13, v3.4.14, v3.4.15, v3.4.16, v3.4.17, v3.4.18, v3.4.19, v3.4.2, v3.4.20, v3.4.21, v3.4.22, v3.4.23, v3.4.24, v3.4.25, v3.4.26, v3.4.27, v3.4.28, v3.4.29, v3.4.3, v3.4.30, v3.4.31, v3.4.4, v3.4.5, v3.4.6, v3.4.7, v3.4.8, v3.4.9].
- Installation request for symfony/css-selector ^4.2 -> satisfiable by symfony/css-selector[v4.2.0, v4.2.1, v4.2.10, v4.2.11, v4.2.2, v4.2.3, v4.2.4, v4.2.5, v4.2.6, v4.2.7, v4.2.8, v4.2.9, v4.3.0, v4.3.1, v4.3.2, v4.3.3, v4.3.4].

最佳答案

此错误意味着您的 composer.json 文件中存在一些包不兼容问题。如果你想强制,运行 composer install --ignore-platform-reqs

但是我建议你检查一下依赖版本是否相互不兼容

关于php - 您的要求无法解析为一组可安装的软件包。 - 交响乐项目,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58270005/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com