composer require workerman/redis 报错

wilson_hj

问题描述

PHP 8.0.8
workerman 4.1.14
composer require workerman/redis 报错,就workman安装后什么都没装,紧急求助!!之前别人发那个贴一样问题解决方法无效

程序代码

Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Root composer.json requires workerman/redis dev-master -> satisfiable by workerman/redis[dev-master].
    - workerman/redis dev-master requires workerman/workerman ^4.1.0||^5.0.0 -> satisfiable by workerman/workerman[v4.1.0, ..., v4.1.14] from composer repo (https://mirrors.aliyun.com/composer) but workerman/workerman is the root package and cannot be modified. See https://getcomposer.org/dep-on-root for details and assistance.

Installation failed, reverting ./composer.json and ./composer.lock to their original content.
662 2 0
2个回答

Tinywan

删除 composer.lock 重新安装试试

latin

你的代理是过时的,删除composer代理
composer config -g --unset repos.packagist

  • wilson_hj 2024-01-11

    也试过了 就是用的https://repo.packagist.org

  • latin 2024-01-11

    截图

  • latin 2024-01-11

    看错误提示你确实用的阿里云的composer

  • wilson_hj 2024-01-11

    Your requirements could not be resolved to an installable set of packages.

    Problem 1

    • Root composer.json requires workerman/redis dev-master -> satisfiable by workerman/redis[dev-master].
    • workerman/redis dev-master requires workerman/workerman ^4.1.0||^5.0.0 -> satisfiable by workerman/workerman[v4.1.0, ..., v4.1.14] from composer repo (https://repo.packagist.org) but workerman/workerman is the root package and cannot be modified. See https://getcomposer.org/dep-on-root for details and assistance.
      真的也试过了
×
🔝