您的要求无法解析为可安装的软件包集

 yuzhenhua09 发布于 2023-01-06 08:03

很抱歉与另一个问题重复此问题.我无法解决我的问题.

我正在研究一个基于的项目Ratchet.我试图运行这个Push Integration例子.所以,为了运行,我应该使用composer来获得一些依赖.我创建一个composer.json文件,如下所示:

{
    "autoload": {
        "psr-0": {
            "MyApp": "src"
        }
    },
    "require": {
        "cboden/ratchet": "0.3.*",
        "react/zmq": "0.2.*|0.3.*"
    }
}

当我在其上执行composer时,出现以下错误:

Loading composer repositories with package information
Installing dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - react/zmq v0.3.0 requires ext-zmq * -> the requested PHP extension zmq is missing from your system.
    - react/zmq v0.2.0 requires ext-zmq * -> the requested PHP extension zmq is missing from your system.
    - Installation request for react/zmq 0.2.*|0.3.* -> satisfiable by react/zmq[v0.2.0, v0.3.0].

您可以在下面找到Ratchet和的composer.json ZMQ:

ZMQ:

{
    "name": "react/zmq",
    "description": "ZeroMQ bindings for React.",
    "keywords": ["zmq", "zeromq"],
    "license": "MIT",
    "require": {
        "php": ">=5.4.0",
        "ext-zmq": "*",
        "evenement/evenement": "~2.0",
        "react/event-loop": "0.4.*"
    },
    "require-dev": {
        "ext-pcntl": "*"
    },
    "autoload": {
        "psr-0": { "React\\ZMQ": "src" }
    },
    "extra": {
        "branch-alias": {
            "dev-master": "0.4-dev"
        }
    }
}

棘轮:

{
    "name": "cboden/ratchet"
  , "type": "library"
  , "description": "PHP WebSocket library"
  , "keywords": ["WebSockets", "Server", "Ratchet", "Sockets"]
  , "homepage": "http://socketo.me"
  , "license": "MIT"
  , "authors": [
        {
            "name": "Chris Boden"
          , "email": "cboden@gmail.com"
          , "role": "Developer"
        }
    ]
  , "support": {
        "forum": "https://groups.google.com/forum/#!forum/ratchet-php"
      , "issues": "https://github.com/ratchetphp/Ratchet/issues"
      , "irc": "irc://irc.freenode.org/reactphp"
    }
  , "autoload": {
        "psr-0": {
            "Ratchet": "src"
        }
    }
  , "require": {
        "php": ">=5.3.9"
      , "react/socket": "0.3.*|0.4.*"
      , "guzzle/http": "~3.6"
      , "symfony/http-foundation": "~2.2"
      , "symfony/routing": "~2.2"
    }
}

怎么了?请给我一个解决方案.提前致谢 :)

撰写答案
今天,你开发时遇到什么问题呢?
立即提问
热门标签
PHP1.CN | 中国最专业的PHP中文社区 | PNG素材下载 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有