使用作曲家无法安装php-amqplib(RabbitMQ)

问题描述 投票:0回答:1

我正在尝试使用此库。 https://github.com/php-amqplib/php-amqplib

composer require php-amqplib/php-amqplib

但是我收到此错误:

Using version ^2.11@dev for php-amqplib/php-amqplib
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

 Problem 1
    - Installation request for php-amqplib/php-amqplib ^2.11@dev -> satisfiable by php-amqplib/php-amqplib[2.11.x-dev, v2.11.0].
    - Can only install one of: phpseclib/phpseclib[2.0.x-dev, dev-master].
    - Can only install one of: phpseclib/phpseclib[dev-master, 2.0.x-dev].
    - Can only install one of: phpseclib/phpseclib[2.0.x-dev, dev-master].
    - Conclusion: install phpseclib/phpseclib 2.0.x-dev
    - Installation request for phpseclib/phpseclib dev-master -> satisfiable by phpseclib/phpseclib[dev-master].
php rabbitmq php-amqplib
1个回答
1
投票

我自己解决了。通过添加

 "php-amqplib/php-amqplib": "^2.6"

在composer.json的require部分并运行composer update

© www.soinside.com 2019 - 2024. All rights reserved.