简体   繁体   中英

I can't install something in Symfony with composer

I need some help again about symfony in general. I try to install mailer to send mail, but when I do sudo composer require symfony/mailer I receive this :

Warning from repo.packagist.org: Support for Composer 1 is deprecated and some packages will not be available. You should upgrade to Composer 2. See blog.packagist.com/deprecating-composer-1-support/ Info from repo.packagist.org: #StandWithUkraine Do not run Composer as root/super user! See getcomposer.org/root for details Warning from repo.packagist.org: Support for Composer 1 is deprecated and some packages will not be available. You should upgrade to Composer 2. See blog.packagist.com/deprecating-composer-1-support/ Info from repo.packagist.org: #StandWithUkraine Restricting packages listed in "symfony/symfony" to "5.4. " ./composer.json has been updated Loading composer repositories with package information Warning from repo.packagist.org: Support for Composer 1 is deprecated and some packages will not be available. You should upgrade to Composer 2. See blog.packagist.com/deprecating-composer-1-support/ Info from repo.packagist.org: #StandWithUkraine Updating dependencies (including require-dev) Restricting packages listed in "symfony/symfony" to "5.4. " Your requirements could not be resolved to an installable set of packages. Problem 1 - doctrine/dbal 3.3.4 requires composer-runtime-api ^2 -> no matching package found. - doctrine/dbal 3.3.4 requires composer-runtime-api ^2 -> no matching package found. - doctrine/dbal 3.3.4 requires composer-runtime-api ^2 -> no matching package found. - Installation request for doctrine/dbal (locked at 3.3.4) -> satisfiable by doctrine/dbal[3.3.4].

Potential causes: -A typo in the package name -The package is not available in a stable-enough version according to your minimum-stability setting ; see <getcomposer.org/doc/04-schema.md#minimum-stability> for more details. -It's a private package and you forgot to add a custom repository to find it Read <hgetcomposer.org/doc/articles/troubleshooting.md> for further common problems. Installation failed, reverting ./composer.json to its original content.

So I went in the website of composer, and they say do to this : sudo composer update to update the versions, so I did it but I have get the same error :

Warning from repo.packagist.org: Support for Composer 1 is deprecated and some packages will not be available. You should upgrade to Composer 2. See blog.packagist.com/deprecating-composer-1-support/ Info from repo.packagist.org: #StandWithUkraine Do not run Composer as root/super user! See getcomposer.org/root for details Loading composer repositories with package information Warning from repo.packagist.org: Support for Composer 1 is deprecated and some packages will not be available. You should upgrade to Composer 2. See blog.packagist.com/deprecating-composer-1-support/ Info from repo.packagist.org: #StandWithUkraine Updating dependencies (including require-dev) Restricting packages listed in "symfony/symfony" to "5.4.*" Your requirements could not be resolved to an installable set of packages. Problem 1 - doctrine/orm 2.13.x-dev requires composer-runtime-api ^2 -> no matching package found. - doctrine/orm 2.12.x-dev requires composer-runtime-api ^2 -> no matching package found. - doctrine/orm 2.12.3 requires composer-runtime-api ^2 -> no matching package found. - doctrine/orm 2.12.2 requires composer-runtime-api ^2 -> no matching package found. - doctrine/orm 2.12.1 requires composer-runtime-api ^2 -> no matching package found. - doctrine/orm 2.12.0 requires composer-runtime-api ^2 -> no matching package found. - doctrine/orm 2.11.x-dev requires composer-runtime-api ^2 -> no matching package found. - doctrine/orm 2.11.3 requires composer-runtime-api ^2 -> no matching package found. - doctrine/orm 2.11.2 requires composer-runtime-api ^2 -> no matching package found. - doctrine/orm 2.11.1 requires composer-runtime-api ^2 -> no matching package found. - doctrine/orm 2.11.0 requires composer-runtime-api ^2 -> no matching package found. - doctrine/orm 2.11.2 requires composer-runtime-api ^2 -> no matching package found. - Installation request for doctrine/orm ^2.11 -> satisfiable by doctrine/orm[2.11.0, 2.11.1, 2.11.2, 2.11.3, 2.11.x-dev, 2.12.0, 2.12.1, 2.12.2, 2.12.3, 2.12.x-dev, 2.13.x-dev]. Potential causes: -A typo in the package name -The package is not available in a stable-enough version according to your minimum-stability setting see <getcomposer.org/doc/04-schema.md#minimum-stability> for more details. -It's a private package and you forgot to add a custom repository to find it Read <getcomposer.org/doc/articles/troubleshooting.md> for further common problems.

If someone have a solution, I really appreciate it

Thanks by advance and have a nice day

run sudo composer self-update . When you run composer update you are only upgrading the packages in the composer file, not the composer executable.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM