centos 7安装zeromq,jzmq

1 篇文章 0 订阅
1 篇文章 0 订阅

一、安装zeromq

   1.下载zeromq安装包,网址为:http://download.zeromq.org/

 2、上传到服务器解压

3.开始安装步骤

cd zeromq

./configure 

make && make install  

二、zeromq安装过程中可能出现的错误

 1、缺少gcc编译器

[root@master zeromq-4.1.6]# ./configure --prefix=/usr/local/zeromq
checking for a BSD-compatible install... /bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking how to create a ustar tar archive... gnutar
checking whether make supports nested variables... yes
checking for gcc... no
checking for cc... no
checking for cl.exe... no
configure: error: in `/usr/local/zeromq-4.1.6':
configure: error: no acceptable C compiler found in $PATH See `config.log' for more details
使用 yum install gcc 命令安装即可

2、找不到g++编译器

configure: error: Unable to find a working C++ compiler

使用命令yum instal gcc-c++安装即可

3、缺少libtool

autogen.sh: error: could not find libtool.  libtool is required to run autogen.sh.

使用命令yum install libtool

三、安装jzmq

这里采用源代码方式安装

yum install git

git clone git://github.com/nathanmarz/jzmq.git

cd jzmq

./autogen.sh

./configure

make

make install

四、可能出现的错误

1.configure: error: cannot find zmq.h

解决办法:

 export LDFLAGS=-L/usr/local/zeromq/lib/

export CPPFLAGS=-I/usr/local/zeromq/include/ 

2.

make[1]: 进入目录“/usr/local/jzmq/src”
make[1]: *** 没有规则可以创建“org/zeromq/ZMQ.class”需要的目标“classdist_noinst.stamp”。 停止。
make[1]: 离开目录“/usr/local/jzmq/src”
make: *** [all-recursive] 错误 1

解决办法:touch src/classdist_noinst.stamp 

3、没有规则可以创建“all”需要的目标“org/zeromq/ZMQ$Context.class

解决办法:touch src/org/zeromq/ZMQ$Context.class

4.错误: 找不到 'org.zeromq.ZMQ' 的类文件。
make[1]: *** [org_zeromq_ZMQ.h] 错误 1
make[1]: 离开目录“/usr/local/jzmq/src”
make: *** [all-recursive] 错误 1
[root@master jzmq]# cd src/org/zeromq/

进入src目录执行命令

javac -d . org/zeromq/*.java  

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值