composer require 报错 Problem 1....., Problem 2.... 问题

composer require php-mqtt/client 报错的问题

The "topthink/think-installer" plugin was skipped because it requires a Plugin API version ("^1.0") that does not match your Composer installation ("2.3.0"). You may need to run composer update with the "--no-p
lugins" option.
The "2.1" constraint for "php-mqtt/client" appears too strict and will likely not match what you want. See https://getcomposer.org/constraints
./composer.json has been updated
The "topthink/think-installer" plugin was skipped because it requires a Plugin API version ("^1.0") that does not match your Composer installation ("2.3.0"). You may need to run composer update with the "--no-p
lugins" option.
Running composer update php-mqtt/client
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 php-mqtt/client 2.1, found php-mqtt/client[dev-feature-redis-repository-on-master, dev-master, v0.1.0, ..., 0.3.x-dev, v1.0.0-rc1, ..., v1.8.0] but it does not match the constr
aint.
  Problem 2
    - topthink/think-installer v1.0.12 requires composer-plugin-api ^1.0 -> found composer-plugin-api[2.3.0] but it does not match the constraint.
    - topthink/framework v5.0.23 requires topthink/think-installer ~1.0 -> satisfiable by topthink/think-installer[v1.0.12].
    - topthink/framework is locked to version v5.0.23 and an update of this package was not requested.


运行 下面命令

composer update --no-plugins

安装成功

composer require php-mqtt/client
Cannot use php-mqtt/client's latest version v1.8.0 as it requires php ^7.4|^8.0 which is not satisfied by your platform.
./composer.json has been updated
Running composer update php-mqtt/client
Loading composer repositories with package information
Updating dependencies
Lock file operations: 2 installs, 0 updates, 0 removals
  - Locking php-mqtt/client (v0.3.0)
  - Locking psr/log (1.1.4)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 2 installs, 0 updates, 0 removals
  - Installing psr/log (1.1.4): Extracting archive
  - Installing php-mqtt/client (v0.3.0): Extracting archive
Generating autoload files
Found 6 security vulnerability advisories affecting 1 package.
Run composer audit for a full list of advisories.
Using version ^0.3.0 for php-mqtt/client

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值