简体   繁体   中英

How do you install Ratchet on Mac OSX?

I have spent hours trying to install Ratchet on my Mac, and I keep running into errors. I'm following this guide, as it is the perfect use case for my project. I have run the composer installation and have successfully generated my composer.phar file in my working directory. I have also created the composer.json file from the tutorial in that same directory.

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

I then cd into my working directory and run

$ php composer.phar install

This gives the following output:

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

  • 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].

So, seeing this, I went to install React/ZeroMQ, but now both of THOSE are giving my installation problems. I'm just plain lost at this point, I can never really tell when something has installed or not. I've run a make and sudo make install for ZeroMQ , but I'm still seeing the same errors when I try to install Ratchet.

For React , I followed the installation guide in the readme, which was only one line. But I'm not sure where this install is supposed to take place. It doesn't seem to be global, so I think the location matters.

Can someone help point me in the right direction to get Ratchet installed?

I have done with the following steps

Install with brew

  • brew install zmq

Make php-zmq

  • git clone git://github.com/mkoppanen/php-zmq.git
  • cd php-zmq
  • phpize && ./configure
  • make && make install

Add extension to php.ini:

  • Find php ini file php --ini
  • add extension=zmq.so

.

Problem

Cannot find autoconf. Please check your autoconf installation and the $PHP_AUTOCONF environment variable. Then, rerun this script

Solution

brew install autoconf

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM