安装workerman/redis失败,求解惑

北晨

php版本:7.3.4
workerman版本:4.0.18
composer版本:2.0
执行操作:
composer config -g repo.packagist composer https://mirrors.aliyun.com/composer/
composer require workerman/redis
报错内容:
Your requirements could not be resolved to an installable set of packages.

Problem 1

  • workerman/redis dev-master requires workerman/workerman >=3.5.0 -> satisfiable by workerman/workerman[dev-master, v3.5.0, ..., 3.x-dev, v4.0.0, ..., v4.0.18] from composer repo (https://mirrors.aliyun.com/composer) but workerman/workerman[dev-master] from root package repo has higher repository priority. The packages with higher priority do not match your constraint and are therefore not installable. See https://getcomposer.org/repoprio for details and a ssistance.
  • Root composer.json requires workerman/redis 9999999-dev -> satisfiable by workerman/redis[].

Installation failed, reverting ./composer.json and ./composer.lock to their original content.

3164 1 0
1个回答

walkor 打赏

workerman/redis 主要用于subscribe publish异步订阅,如果不是用于subscribe publish异步订阅,请使用redis扩展。

我不清楚为什么你的composer选择安装 workerman/redis 9999999-dev,有可能是你的composer.json里做了很么特别的设置。如果composer.json没有问题,尝试使用命令 composer require workerman/redis ^1.0.4 来安装。如果还有问题,尝试在一个空的项目里执行`composer require workerman/redis ^1.0.4试下。

年代过于久远,无法发表回答
×
🔝