I am following along with this tutorial for installing Magento 2.3 on Ubuntu. I am able to get up to the point where I’m supposed to use composer to create a Magento 2 project using this command:
composer create-project --repository-url=https://repo.magento.com/ magento/project-community-edition=2.3.0 .
After inputting this command, I get the following output:
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.
I have been following the tutorial exactly, however there error does not appear in the tutorial. Does anyone know how to fix this error?
2
Answers
I faced with the same issue.
After changing version of the composer:
the problem was solved.
You may find in m2 docs that 2.3.0 doesn’t support composer 2
https://devdocs.magento.com/guides/v2.4/install-gde/system-requirements.html
So use
composer self-update --1