Ubuntu 14.04安装zeromq jzmq

准备:

sudo apt-get update
sudo apt-get install g++ gcc make pkgconf
先安装好编译环境。

从官网上下载zeromq-4.2.2.tar.gz文件并解压。

wget https://github.com/zeromq/libzmq/releases/download/v4.2.2/zeromq-4.2.2.tar.gz
tar -zxf zeromq-4.2.2.tar.gz
cd zeromq-4.2.2
执行编译命令
./confiture
make
make install

如果编译过程出错则执行以下命令

./configure --prefix=/home/ygy/zmq --without-libsodium
make
在https://github.com/nathanmarz/jzmq里下载jzmq
unzip -zxf jzmq-master.zip
./autogen.sh
./configure
make
make install
报错:configure: error: cannot find zmq.h 

export CPPFLAGS=-I/home/admin/zeromq/include/ 
export LDFLAGS=-L/home/applications/zeromq/lib/
./configure --prefix=/home/applications/jzmq --with-pgm
make
make install
make 的时候,可能会遇到如下错误:
make[1]: *** No rule to make target `classdist_noinst.stamp', needed by `org/zeromq/ZMQ.class'.  Stop. 

解决方法是创建 classdist_noinst.stamp 文件,

touch src/classdist_noinst.stamp


猜你喜欢

转载自blog.csdn.net/danielchan2518/article/details/77150826