"Your requirements could not be resolved to an installable set of packages." 创建 Magento 2 项目时
"Your requirements could not be resolved to an installable set of packages." when creating a Magento 2 project
我正在跟随 this tutorial 在 Ubuntu 上安装 Magento 2.3。我能够达到我应该使用 composer 使用此命令创建 Magento 2 项目的地步:
composer create-project --repository-url=https://repo.magento.com/ magento/project-community-edition=2.3.0 .
输入此命令后,我得到以下输出:
Creating a "magento/project-community-edition=2.3.0" project at "./"
Installing magento/project-community-edition (2.3.0)
- Installing magento/project-community-edition (2.3.0): Extracting archive
Created project in /var/www/html/.
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Root composer.json requires magento/product-community-edition 2.3.0 -> satisfiable by magento/product-community-edition[2.3.0].
- magento/product-community-edition 2.3.0 requires magento/composer ~1.4.0 -> satisfiable by magento/composer[1.4.0] from composer repo (https://repo.packagist.org) but magento/composer[1.0.2, ..., 1.6.0] from composer repo (https://repo.magento.com) has higher repository priority. The packages with higher priority do not match your constraint and are therefore not installable. See https://getcomposer.org/repoprio for details and assistance.
我一直在严格按照教程进行操作,但是教程中没有出现错误。有谁知道如何解决这个错误?
我遇到了同样的问题。
更改作曲家版本后:
composer self-update 1.4.0
问题已解决。
您可能会在 m2 文档中发现 2.3.0 不支持 composer 2
https://devdocs.magento.com/guides/v2.4/install-gde/system-requirements.html
所以用
composer self-update --1
我正在跟随 this tutorial 在 Ubuntu 上安装 Magento 2.3。我能够达到我应该使用 composer 使用此命令创建 Magento 2 项目的地步:
composer create-project --repository-url=https://repo.magento.com/ magento/project-community-edition=2.3.0 .
输入此命令后,我得到以下输出:
Creating a "magento/project-community-edition=2.3.0" project at "./"
Installing magento/project-community-edition (2.3.0)
- Installing magento/project-community-edition (2.3.0): Extracting archive
Created project in /var/www/html/.
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Root composer.json requires magento/product-community-edition 2.3.0 -> satisfiable by magento/product-community-edition[2.3.0].
- magento/product-community-edition 2.3.0 requires magento/composer ~1.4.0 -> satisfiable by magento/composer[1.4.0] from composer repo (https://repo.packagist.org) but magento/composer[1.0.2, ..., 1.6.0] from composer repo (https://repo.magento.com) has higher repository priority. The packages with higher priority do not match your constraint and are therefore not installable. See https://getcomposer.org/repoprio for details and assistance.
我一直在严格按照教程进行操作,但是教程中没有出现错误。有谁知道如何解决这个错误?
我遇到了同样的问题。
更改作曲家版本后:
composer self-update 1.4.0
问题已解决。
您可能会在 m2 文档中发现 2.3.0 不支持 composer 2 https://devdocs.magento.com/guides/v2.4/install-gde/system-requirements.html
所以用
composer self-update --1