简体   繁体   English

我无法使用 composer 在 Symfony 中安装某些东西

[英]I can't install something in Symfony with composer

I need some help again about symfony in general.总的来说,我需要一些关于 symfony 的帮助。 I try to install mailer to send mail, but when I do sudo composer require symfony/mailer I receive this :我尝试安装邮件程序来发送邮件,但是当我执行sudo composer require symfony/mailer时,我收到了这个:

Warning from repo.packagist.org: Support for Composer 1 is deprecated and some packages will not be available.来自 repo.packagist.org 的警告:对 Composer 1 的支持已被弃用,某些软件包将不可用。 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!您应该升级到 Composer 2。请参阅 blog.packagist.com/deprecating-composer-1-support/ 来自 repo.packagist.org 的信息:#StandWithUkraine 不要以 root/超级用户身份运行 Composer! See getcomposer.org/root for details Warning from repo.packagist.org: Support for Composer 1 is deprecated and some packages will not be available.有关详细信息,请参阅 getcomposer.org/root 来自 repo.packagist.org 的警告:不推荐使用对 Composer 1 的支持,并且某些软件包将不可用。 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.您应该升级到 Composer 2。请参阅 blog.packagist.com/deprecating-composer-1-support/ 来自 repo.packagist.org 的信息:#StandWithUkraine 将“symfony/symfony”中列出的软件包限制为“5.4. ”./composer。 json 已更新使用包信息加载作曲家存储库来自 repo.packagist.org 的警告:不推荐使用对 Composer 1 的支持,并且某些包将不可用。 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.您应该升级到 Composer 2。请参阅 blog.packagist.com/deprecating-composer-1-support/ 来自 repo.packagist.org 的信息:#StandWithUkraine 更新依赖项(包括 require-dev) 将“symfony/symfony”中列出的包限制为“5.4. ” 您的要求无法解析为一组可安装的软件包。 Problem 1 - doctrine/dbal 3.3.4 requires composer-runtime-api ^2 -> no matching package found.问题 1 - 学说/dbal 3.3.4 需要 composer-runtime-api ^2 -> 找不到匹配的包。 - doctrine/dbal 3.3.4 requires composer-runtime-api ^2 -> no matching package found. - 学说/dbal 3.3.4 需要 composer-runtime-api ^2 -> 找不到匹配的包。 - doctrine/dbal 3.3.4 requires composer-runtime-api ^2 -> no matching package found. - 学说/dbal 3.3.4 需要 composer-runtime-api ^2 -> 找不到匹配的包。 - Installation request for doctrine/dbal (locked at 3.3.4) -> satisfiable by doctrine/dbal[3.3.4]. - 对教义/dbal 的安装请求(锁定在 3.3.4)-> 可满足教义/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.有关详细信息,请参阅 <getcomposer.org/doc/04-schema.md#minimum-stability>。 -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. - 这是一个私有包,您忘记添加自定义存储库来查找它阅读 <hgetcomposer.org/doc/articles/troubleshooting.md> 以了解更多常见问题。 Installation failed, reverting ./composer.json to its original content.安装失败,正在将 ./composer.json 还原为其原始内容。

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 :所以我进入了作曲家的网站,他们说这样做: sudo composer update更新版本,所以我这样做了,但我得到了同样的错误:

Warning from repo.packagist.org: Support for Composer 1 is deprecated and some packages will not be available.来自 repo.packagist.org 的警告:对 Composer 1 的支持已被弃用,某些软件包将不可用。 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!您应该升级到 Composer 2。请参阅 blog.packagist.com/deprecating-composer-1-support/ 来自 repo.packagist.org 的信息:#StandWithUkraine 不要以 root/超级用户身份运行 Composer! 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.有关详细信息,请参阅 getcomposer.org/root 加载包含包信息的作曲家存储库来自 repo.packagist.org 的警告:不推荐使用对 Composer 1 的支持,并且某些包将不可用。 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.您应该升级到 Composer 2。请参阅 blog.packagist.com/deprecating-composer-1-support/ 来自 repo.packagist.org 的信息:#StandWithUkraine 更新依赖项(包括 require-dev) 将“symfony/symfony”中列出的包限制为"5.4.*" 您的要求无法解析为一组可安装的软件包。 Problem 1 - doctrine/orm 2.13.x-dev requires composer-runtime-api ^2 -> no matching package found.问题 1 - 学说/orm 2.13.x-dev 需要 composer-runtime-api ^2 -> 找不到匹配的包。 - doctrine/orm 2.12.x-dev requires composer-runtime-api ^2 -> no matching package found. - 学说/orm 2.12.x-dev 需要 composer-runtime-api ^2 -> 找不到匹配的包。 - doctrine/orm 2.12.3 requires composer-runtime-api ^2 -> no matching package found. - 学说/orm 2.12.3 需要 composer-runtime-api ^2 -> 找不到匹配的包。 - doctrine/orm 2.12.2 requires composer-runtime-api ^2 -> no matching package found. - 学说/orm 2.12.2 需要 composer-runtime-api ^2 -> 找不到匹配的包。 - doctrine/orm 2.12.1 requires composer-runtime-api ^2 -> no matching package found. - 学说/orm 2.12.1 需要 composer-runtime-api ^2 -> 找不到匹配的包。 - doctrine/orm 2.12.0 requires composer-runtime-api ^2 -> no matching package found. - 学说/orm 2.12.0 需要 composer-runtime-api ^2 -> 找不到匹配的包。 - doctrine/orm 2.11.x-dev requires composer-runtime-api ^2 -> no matching package found. - 学说/orm 2.11.x-dev 需要 composer-runtime-api ^2 -> 找不到匹配的包。 - doctrine/orm 2.11.3 requires composer-runtime-api ^2 -> no matching package found. - 学说/orm 2.11.3 需要 composer-runtime-api ^2 -> 找不到匹配的包。 - doctrine/orm 2.11.2 requires composer-runtime-api ^2 -> no matching package found. - 学说/orm 2.11.2 需要 composer-runtime-api ^2 -> 找不到匹配的包。 - doctrine/orm 2.11.1 requires composer-runtime-api ^2 -> no matching package found. - 学说/orm 2.11.1 需要 composer-runtime-api ^2 -> 找不到匹配的包。 - doctrine/orm 2.11.0 requires composer-runtime-api ^2 -> no matching package found. - 学说/orm 2.11.0 需要 composer-runtime-api ^2 -> 找不到匹配的包。 - doctrine/orm 2.11.2 requires composer-runtime-api ^2 -> no matching package found. - 学说/orm 2.11.2 需要 composer-runtime-api ^2 -> 找不到匹配的包。 - 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]. - 学说/orm ^2.11 的安装请求 -> 可满足学说/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.潜在原因: - 包名称中的拼写错误 - 根据您的最低稳定性设置,该包在足够稳定的版本中不可用,有关详细信息,请参阅 <getcomposer.org/doc/04-schema.md#minimum-stability> . -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. - 这是一个私有包,您忘记添加自定义存储库来查找它阅读 <getcomposer.org/doc/articles/troubleshooting.md> 以了解更多常见问题。

If someone have a solution, I really appreciate it如果有人有解决方案,我真的很感激

Thanks by advance and have a nice day提前感谢,祝您有美好的一天

run sudo composer self-update .运行sudo composer self-update When you run composer update you are only upgrading the packages in the composer file, not the composer executable.当您运行composer update时,您只升级了 composer 文件中的包,而不是composer可执行文件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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