加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 站长学院 > PHP教程 > 正文

tp5 workerman安装不上解决方法

发布时间:2020-12-13 21:02:47 所属栏目:PHP教程 来源:网络整理
导读:tp5 workerman安装不上怎么办? 今天在tp5下安装Workerman时出现了以下问题 $composer require topthink/think-workerUsing version ^2.0 for topthink/think-worker./composer.json has been updatedLoading composer repositories with package informatio

tp5 workerman安装不上怎么办?

今天在tp5下安装Workerman时出现了以下问题

$composer require topthink/think-worker

Using version ^2.0 for topthink/think-worker

./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

    - topthink/think-worker v2.0.9 requires topthink/framework ^5.1.18 -> satisfiable by topthink/framework[5.1.x-dev,5.2.x-dev,v5.1.18,v5.1.19,v5.1.20,v5.1.21,v5.1.22,v5.1.23,v5.1.24,v5.1.25,v5.1.26,v5.1.27,v5.1.28,v5.1.29,v5.1.30,v5.1.31,v5.1.32,v5.2-beta.2] but these conflict with your requirementsor minimum-stability.

    - topthink/think-worker v2.0.8 requires topthink/framework 5.1.* -> satisfiable by topthink/framework[5.1.x-dev,v5.1-beta.1,v5.1-rc.1,v5.1-rc.2,v5.1-rc.3,v5.1.0,v5.1.1,v5.1.10,v5.1.11,v5.1.12,v5.1.13,v5.1.14,v5.1.15,v5.1.16,v5.1.17,v5.1.2,v5.1.3,v5.1.4,v5.1.5,v5.1.6,v5.1.7,v5.1.8,v5.1.9] but these conflict with your requirements or minimum-stability.

    - topthink/think-worker v2.0.7 requires topthink/framework 5.1.* -> satisfiable by topthink/framework[5.1.x-dev,v5.1.9] but these conflict with your requirements or minimum-stability.

    - topthink/think-worker v2.0.6 requires topthink/framework 5.1.* -> satisfiable by topthink/framework[5.1.x-dev,v5.1.9] but these conflict with your requirements or minimum-stability.

    - topthink/think-worker v2.0.5 requires topthink/framework 5.1.* -> satisfiable by topthink/framework[5.1.x-dev,v5.1.9] but these conflict with your requirements or minimum-stability.

    - topthink/think-worker v2.0.4 requires topthink/framework 5.1.* -> satisfiable by topthink/framework[5.1.x-dev,v5.1.9] but these conflict with your requirements or minimum-stability.

    - topthink/think-worker v2.0.3 requires topthink/framework 5.1.* -> satisfiable by topthink/framework[5.1.x-dev,v5.1.9] but these conflict with your requirements or minimum-stability.

    - topthink/think-worker v2.0.2 requires topthink/framework 5.1.* -> satisfiable by topthink/framework[5.1.x-dev,v5.1.9] but these conflict with your requirements or minimum-stability.

    - topthink/think-worker v2.0.11 requires topthink/framework ^5.1.18 -> satisfiable by topthink/framework[5.1.x-dev,v5.2-beta.2] but these conflict with your requirements or minimum-stability.

    - topthink/think-worker v2.0.10 requires topthink/framework ^5.1.18 -> satisfiable by topthink/framework[5.1.x-dev,v5.2-beta.2] but these conflict with your requirements or minimum-stability.

    - topthink/think-worker v2.0.1 requires topthink/framework 5.1.* -> satisfiable by topthink/framework[5.1.x-dev,v5.1.9] but these conflict with your requirements or minimum-stability.

    - topthink/think-worker v2.0.0 requires topthink/framework 5.1.* -> satisfiable by topthink/framework[5.1.x-dev,v5.1.9] but these conflict with your requirements or minimum-stability.

    - Installation request for topthink/think-worker ^2.0 -> satisfiable by topthink/think-worker[v2.0.0,v2.0.1,v2.0.10,v2.0.11,v2.0.2,v2.0.3,v2.0.4,v2.0.5,v2.0.6,v2.0.7,v2.0.8,v2.0.9].

  

  

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

  

以上信息显示composer在更新composer.json文件后,在安装依赖时报错Your requirements could not be resolved to an installable set of packages,意思就是请求无法解析为可用的安装包,为什么呢?

我们来看提示部分问题,告诉我们topthink/think-worker v2.0.*相关版本需要依赖的是TP5.1版本,而我的TP版本是5.0.*

Problem 1

    - topthink/think-worker v2.0.9 requires topthink/framework ^5.1.18 -> satisfiable by topthink/framework[5.1.x-dev,v2.0.9].

  

明确了问题,那我们在安装topthink/think-worker时就相应选择低版本的,这里我们尝试使用1.0.*版本的

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

./composer.json has been updated

Loading composer repositories with package information

Updating dependencies (including require-dev)

Package operations: 11 installs,0 updates,0 removals

  - Installing topthink/think-installer (v1.0.12): Downloading (100%)

  - Installing topthink/framework (v5.0.23): Downloading (100%)

  - Installing topthink/think-image (v1.0.7): Downloading (100%)

  - Installing topthink/think-captcha (v1.0.7): Downloading (100%)

  - Installing topthink/think-mongo (v1.8.5): Downloading (100%)

  - Installing topthink/think-migration (v1.1.1): Downloading (100%)

  - Installing topthink/think-helper (v1.0.7): Downloading (100%)

  - Installing topthink/think-queue (v1.1.6): Downloading (100%)

File applicationextraqueue.php exist!

  - Installing phpmailer/phpmailer (v6.0.6): Downloading (100%)

  - Installing workerman/workerman (v3.5.17): Loading from cache

  - Installing topthink/think-worker (v1.0.1): Downloading (100%)

phpmailer/phpmailer suggests installing psr/log (For optional PSR-3 debug logging)

phpmailer/phpmailer suggests installing league/oauth2-google (Needed for GoogleXOAUTH2 authentication)

phpmailer/phpmailer suggests installing hayageek/oauth2-yahoo (Needed for YahooXOAUTH2 authentication)

phpmailer/phpmailer suggests installing stevenmaguire/oauth2-microsoft (Needed for Microsoft XOAUTH2 authentication)

phpmailer/phpmailer suggests installing symfony/polyfill-mbstring (To support UTF-8 if the Mbstring PHP extension is not enabled (^1.2))

workerman/workerman suggests installing ext-event (For better performance. )

Writing lock file

Generating autoload files
安装成功后,根据tp5.0官方手册,如果需要在windows下做服务端,还需要安装workerman/workerman-for-win

$ composer require workerman/workerman-for-win

Using version ^3.5 for workerman/workerman-for-win

./composer.json has been updated

Loading composer repositories with package information

Updating dependencies (including require-dev)

Package operations: 1 install,0 removals

  - Installing workerman/workerman-for-win (v3.5.1):Downloading (100%)         )

Writing lock file

Generating autoload files

  

以上就是tp5 workerman安装不上怎么办的详细内容

更多学习内容请访问:

腾讯T3-T4标准精品PHP架构师教程目录大全,只要你看完保证薪资上升一个台阶(持续更新)

?

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读