通过自制软件安装时的zeromq问题 [英] zeromq problems when installed via homebrew

查看:172
本文介绍了通过自制软件安装时的zeromq问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在运行Sierra的Mac上安装zeromq.根据安装指南 http://zeromq.org/intro:get-the-software,您可以运行以下命令来安装zeromq库:

I am trying to install zeromq on a mac running Sierra. According to the installation guide http://zeromq.org/intro:get-the-software, you can install zeromq library by running:

brew install zmq

成功安装后,我将"react/zmq": "0.2.*|0.3.*"添加到composer.json的require部分并运行composer install

After successfull installation I proceded with adding "react/zmq": "0.2.*|0.3.*" to the require section of the composer.json and running composer install

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

我认为这与已经安装了默认php的macs有关,并且针对错误的php版本进行brew install zeromq的酿造.我应该如何进一步调试此问题?

I think this has to do with macs having default php already installed and brew installing zeromq for the wrong php version. How should I debug this problem further?

php -m没有显示libzmg程序包. php -i显示版本PHP Version => 5.6.30.在浏览器中检查phpinfo()也会返回版本5.6.30

php -m shows no libzmg package. php -i shows version PHP Version => 5.6.30. Inspecting phpinfo() in a browser also returns version 5.6.30

推荐答案

好.我终于找到了一种方法.

Well. I had finally found a way to do it.

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

现在,您需要找出CLI上加载了哪个php.ini文件

Now you need find out which php.ini file is loaded on your CLI

$ php --ini

或者您可以通过键入以下命令来查找

or you can find out by typing following command

$ php -i | grep 'Configuration File'

如果没有任何内容,请添加"/etc/php.ini" .我添加了一个,通常您在"/etc"上存在php.ini.default,将该位置复制到"/etc/php.ini"

If not anything please add on on "/etc/php.ini". I have added one, generally you have php.ini.default is present on "/etc" make a copy of that place in to "/etc/php.ini"

然后您需要找到zmq.so文件,您可以通过输入

then you need find out the zmq.so file, you can find that by typing

$ sudo find / -name zmq.so

如果是/Library/WebServer/Documents/drupal/php-zmq/.libs/zmq.so

因此它将是"Path/TO/ php-zmq/.libs/zmq.so "

So it will be "Path/TO/php-zmq/.libs/zmq.so"

然后编辑您的php.ini文件,并添加zmq.so

Then edit your php.ini file and add the exact path of zmq.so

在我的情况下为" extension =/Library/WebServer/Documents/drupal/php-zmq/.libs/zmq.so "

extension=/$PATH_TO/php-zmq/.libs/zmq.so

祝一切顺利...

这篇关于通过自制软件安装时的zeromq问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆