php版本:7.3.4
workerman版本:4.0.18
composer版本:2.0
執(zhí)行操作:
composer config -g repo.packagist composer https://mirrors.aliyun.com/composer/
composer require workerman/redis
報(bào)錯(cuò)內(nèi)容:
Your requirements could not be resolved to an installable set of packages.
Problem 1
Installation failed, reverting ./composer.json and ./composer.lock to their original content.
workerman/redis 主要用于subscribe publish異步訂閱,如果不是用于subscribe publish異步訂閱,請(qǐng)使用redis擴(kuò)展。
我不清楚為什么你的composer選擇安裝 workerman/redis 9999999-dev
,有可能是你的composer.json里做了很么特別的設(shè)置。如果composer.json沒有問題,嘗試使用命令 composer require workerman/redis ^1.0.4
來安裝。如果還有問題,嘗試在一個(gè)空的項(xiàng)目里執(zhí)行`composer require workerman/redis ^1.0.4
試下。