首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >composer安装和更新时发生composer错误?

composer安装和更新时发生composer错误?
EN

Stack Overflow用户
提问于 2021-05-18 14:23:36
回答 1查看 2.5K关注 0票数 1

运行composer install时,会出现以下错误,

代码语言:javascript
复制
Installing dependencies from lock file (including require-dev)
Verifying lock file contents can be installed on current platform.
Your lock file does not contain a compatible set of packages. Please run composer update.

  Problem 1
    - laminas/laminas-dependency-plugin is locked to version 1.0.4 and an update of this package was not requested.
    - laminas/laminas-dependency-plugin 1.0.4 requires composer-plugin-api ^1.1 -> found composer-plugin-api[2.0.0] but it does not match the constraint.
  Problem 2
    - magento/composer-root-update-plugin is locked to version 1.0.0 and an update of this package was not requested.
    - magento/composer-root-update-plugin 1.0.0 requires composer-plugin-api ^1.0 -> found composer-plugin-api[2.0.0] but it does not match the constraint.
  Problem 3
    - magento/inventory-composer-installer is locked to version 1.1.0 and an update of this package was not requested.
    - magento/inventory-composer-installer 1.1.0 requires composer-plugin-api ^1.1 -> found composer-plugin-api[2.0.0] but it does not match the constraint.
  Problem 4
    - magento/magento-composer-installer is locked to version 0.1.13 and an update of this package was not requested.
    - magento/magento-composer-installer 0.1.13 requires composer-plugin-api ^1.0 -> found composer-plugin-api[2.0.0] but it does not match the constraint.
  Problem 5
    - dealerdirect/phpcodesniffer-composer-installer is locked to version v0.5.0 and an update of this package was not requested.
    - dealerdirect/phpcodesniffer-composer-installer v0.5.0 requires composer-plugin-api ^1.0 -> found composer-plugin-api[2.0.0] but it does not match the constraint.
  Problem 6
    - magento/magento-composer-installer 0.1.13 requires composer-plugin-api ^1.0 -> found composer-plugin-api[2.0.0] but it does not match the constraint.
    - magento/product-community-edition 2.4.1 requires magento/magento-composer-installer >=0.1.11 -> satisfiable by magento/magento-composer-installer[0.1.13].
    - magento/product-community-edition is locked to version 2.4.1 and an update of this package was not requested.

You are using Composer 2, which some of your plugins seem to be incompatible with. Make sure you update your plugins or report a plugin-issue to ask them to support Composer 2.

然后,如果我总是在错误下面运行composer update,

代码语言:javascript
复制
Loading composer repositories with package information
https://repo.magento.com could not be fully loaded (Unable to use a proxy: malformed http_proxy url), package information was loaded from the local cache and may be out of date


  [Composer\Downloader\TransportException]
  Unable to use a proxy: malformed http_proxy url


update [--with WITH] [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--lock] [--no-install] [--no-autoloader] [--no-scripts] [--no-suggest] [--no-progress] [-w|--with-dependencies] [-W|--with-all-dependencies] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--apcu-autoloader-prefix APCU-AUTOLOADER-PREFIX] [--ignore-platform-req IGNORE-PLATFORM-REQ] [--ignore-platform-reqs] [--prefer-s
EN

回答 1

Stack Overflow用户

发布于 2021-05-18 20:23:39

这是你遗漏的主要信息:

代码语言:javascript
复制
laminas/laminas-dependency-plugin 1.0.4 requires composer-plugin-api ^1.1 -> found composer-plugin-api[2.0.0] but it does not match the constraint

它会告诉您正在使用Composer v2,而您的一些包仍然需要Composer v1。您应该将Composer降级到v1,或者升级软件包。

有选择的升级可以通过类似于composer update laminas/laminas-dependency-plugin magento/composer-root-update-plugin的方式来完成

票数 3
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/67580950

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档