linux 下 php 安装 ZeroMQ 扩展
发布时间:2020-05-23 19:12:34 所属栏目:Linux 来源:互联网
导读:一、下载安装源码包 ZeroMQ源码包下载地址: http://zeromq.org/area:download 如:zeromq-4.1.4.tar.gz php的zmq扩展源码包 https://
|
一、下载安装源码包 ZeroMQ源码包下载地址:http://zeromq.org/area:download如:zeromq-4.1.4.tar.gz php的zmq扩展源码包 https://pecl.php.net/package/zmq或如下地址: https://github.com/mkoppanen/php-zmq如:zmq-1.1.3.tgz 二、安装目录 ZeroMQ安装目录 /data/zeromq php安装目录 /data/nmp/php三、安装ZeroMQ > tar zxvf zeromq-4.1.4.tar.gz > cd zeromq-4.1.4 > ./autogen.sh > ./configure --prefix=/data/zeromq > make && make install > ldconfig如果出现如下问题: No package 'libsodium' found请到如下网址下载libsodium并安装 https://github.com/jedisct1/libsodium > cd libsodium-master/ > ./autogen.sh > ./configure > make && make install > ldconfig > vi /root/.bashrc #添加如下信息 export sodium_CFLAGS="-I/usr/local/include" export sodium_LIBS="-L/usr/local/lib" export CPATH=/usr/local/include export LIBRARY_PATH=/usr/local/lib export LD_LIBRARY_PATH=/usr/local/lib export LD_RUN_PATH=/usr/local/lib export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig export CFLAGS=$(pkg-config --cflags libsodium) export LDFLAGS=$(pkg-config --libs libsodium) > source ~/.bashrc > echo "/usr/local/lib" > tee -a /etc/ld.so.conf.d/libsodium.conf 如果出现如下问题: libtool is required,but wasn't found on this system请到如下网址下载libtool并安装 http://ftp.gnu.org/gnu/libtool/ > tar zxvf libtool-2.4.6.tar.gz > cd libtool-2.4.6 > ./configure > make && make install如果出现如下问题: autoreconf: Entering directory `.' autoreconf: configure.ac: not using Gettext autoreconf: running: aclocal --force -I m4 configure.ac:1: error: Autoconf version 2.65 or higher is required configure.ac:1: the top level autom4te: /usr/bin/m4 failed with exit status: 63 aclocal: autom4te failed with exit status: 63 autoreconf: aclocal failed with exit status: 63到如下网址下载autoconf并安装 http://ftp.gnu.org/gnu/autoconf/ > tar zxvf autoconf-latest.tar.gz > cd autoconf-2.69 > ./configure > make && make install如果出现如下问题: configure.ac:682: error: possibly undefined macro: AC_LIBTOOL_WIN32_DLL If this token and others are legitimate,please use m4_pattern_allow. See the Autoconf documentation. autoreconf: /usr/local/bin/autoconf failed with exit status: 1建议把如下工具都更新一下 > yum -y install automake autoconf m4 libtool 四、安装php扩展 > tar zmq-1.1.3.tgz > cd zmq-1.1.3 > /data/nmp/php/bin/phpize > ./configure --with-php-config=/data/nmp/php/bin/php-config --with-zmq=/data/zeromq > make && make install如果出现如下信息: Installing shared extensions: /data/nmp/php/lib/php/extensions/no-debug-non-zts-20151012/修改php.ini添加如下 extension = zmq.so重启php-fpm,查看phpinfo()。 (编辑:安卓应用网) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
