注册 登陆

    2021-03-15 22:48:48composer安装Workerman报错:Installation failed, reverting ./composer.json to its original content.

    您现在的位置是: 首页 >  php >  composer安装Workerman报错:Installation failed, reverting ./composer.json to its original content.

    今天想在TP5上安装workerman,实现一个后台消息提醒功能。

    第一步就卡住了,根据手册里说的首先通过composer安装

    $ composer require topthink/think-worker

    结果报错:

    Updating dependencies (including require-dev)
    Your requirements could not be resolved to an installable set of packages.

    Problem 1
    - topthink/think-worker v3.0.5 requires topthink/framework ^6.0.0 -> satisfiable by topthink/framework[6.0.x-dev, v6.0.0, v6.0.0-rc2, v6.0.0-rc3, v6.0.0-rc4, v6.0.0-rc5, v6.0.1, v6.0.2, v6.0.3, v6.0.4, v6.0.5, v6.0.6, v6.0.7] but these conflict with your requirements or minimum-stability.
    - topthink/think-worker v3.0.4 requires topthink/framework ^6.0.0 -> satisfiable by topthink/framework[6.0.x-dev, v6.0.0, v6.0.0-rc2, v6.0.0-rc3, v6.0.0-rc4, v6.0.0-rc5, v6.0.1, v6.0.2, v6.0.3, v6.0.4, v6.0.5, v6.0.6, v6.0.7] but these conflict with your requirements or minimum-stability.
    - topthink/think-worker v3.0.3 requires topthink/framework ^6.0.0 -> satisfiable by topthink/framework[6.0.x-dev, v6.0.0, v6.0.0-rc2, v6.0.0-rc3, v6.0.0-rc4, v6.0.0-rc5, v6.0.1, v6.0.2, v6.0.3, v6.0.4, v6.0.5, v6.0.6, v6.0.7] but these conflict with your requirements or minimum-stability.
    - topthink/think-worker v3.0.2 requires topthink/framework ^6.0.0 -> satisfiable by topthink/framework[6.0.x-dev, v6.0.0, v6.0.0-rc2, v6.0.0-rc3, v6.0.0-rc4, v6.0.0-rc5, v6.0.1, v6.0.2, v6.0.3, v6.0.4, v6.0.5, v6.0.6, v6.0.7] but these conflict with your requirements or minimum-stability.
    - topthink/think-worker v3.0.1 requires topthink/framework ^6.0.0 -> satisfiable by topthink/framework[6.0.x-dev, v6.0.0, v6.0.0-rc2, v6.0.0-rc3, v6.0.0-rc4, v6.0.0-rc5, v6.0.1, v6.0.2, v6.0.3, v6.0.4, v6.0.5, v6.0.6, v6.0.7] but these conflict with your requirements or minimum-stability.
    - topthink/think-worker v3.0.0 requires topthink/framework ^6.0.0 -> satisfiable by topthink/framework[6.0.x-dev, v6.0.0, v6.0.0-rc2, v6.0.0-rc3, v6.0.0-rc4, v6.0.0-rc5, v6.0.1, v6.0.2, v6.0.3, v6.0.4, v6.0.5, v6.0.6, v6.0.7] but these conflict with your requirements or minimum-stability.
    - Installation request for topthink/think-worker ^3.0 -> satisfiable by topthink/think-worker[v3.0.0, v3.0.1, v3.0.2, v3.0.3, v3.0.4, v3.0.5].


    Installation failed, reverting ./composer.json to its original content.

    网上找了好多资料,都不对,后来发现是workerman版本的问题,重新安装

    composer require topthink/think-worker=1.0.* -vvv

    如果需要在window下做服务端,还需要

    composer require workerman/workerman-for-win -vvv

    安装好以后项目根目录下的vendor目录下会多出两个文件夹,topthink和workerman

关键字词: composer安装Workerman报错:Installation failed, reverting ./composer.json to its original content.

0