在Ubuntu上编译JZMQ [英] Compiling JZMQ on Ubuntu
问题描述
您好,我正在尝试按照以下说明进行操作: https://github.com/nathanmarz/storm/wiki/Installing-native-dependencies ,用于在Ubuntu 12.04计算机上将Zero MQ安装为Storm的依赖项.但是,当尝试运行make命令时,出现以下错误
Hello all I'm attempting to follow the directions located at: https://github.com/nathanmarz/storm/wiki/Installing-native-dependencies for installing Zero MQ as a dependency for Storm on a Ubuntu 12.04 machine. However when trying to run the make command I get the following error
Making all in src
make[1]: Entering directory `/home/localadmin/jzmq/src'
make[1]: *** No rule to make target `classdist_noinst.stamp', needed by `org/zeromq/ZMQ.class'. Stop.
make[1]: Leaving directory `/home/localadmin/jzmq/src'
make: *** [all-recursive] Error 1
有人知道这个错误的根源以及如何纠正吗?
Does anyone have any idea where this error stems from and how I would be able to correct it?
推荐答案
显然,在Ubuntu 12.04上编译JZMQ比我意识到的要复杂得多.但是,我花时间写出了找到的解决方案.您可以在以下位置找到它:在Ubuntu 12.04上安装Storm的本机依赖项. 为了方便起见,以下是说明:
Apparently compiling JZMQ on Ubuntu 12.04 is a little bit more involved than I realized. However I took the time to write out the solution that I found. You can find it at: Installing Storm's Native Dependencies on Ubuntu 12.04. For time's sake here are the instructions:
- 您需要确保先安装一些软件包:build-essential,uuid-dev,libtool,git,autoconf,openjdk-6-jdk
-
创建一个JAVA_HOME变量,该变量指向刚安装的jdk.应该在/usr/lib/jvm目录中
- You’ll need to ensure that a few packages are installed first: build-essential, uuid-dev, libtool, git, autoconf, openjdk-6-jdk
Create a JAVA_HOME variable that point the the jdk you just installed. Should be in the /usr/lib/jvm directory
JAVA_HOME=/usr/lib/jvm/(your jdk folder); export JAVA_HOME
运行以下命令以安装零MQ:
Run the following commands for installing Zero MQ:
wget http://download.zeromq.org/zeromq-2.1.7.tar.gz
tar -xzf zeromq-2.1.7.tar.gz
cd zeromq-2.1.7
./configure
make
sudo make install
下载JZMQ并导航到src目录
Download JZMQ and navigate to the the src directory
git clone https://github.com/nathanmarz/jzmq.git
cd jzmq
cd src
在src目录中运行一次touch命令来创建一个文件,然后重新定义类路径.
Once in the src directory run the touch command to create a file and then redefine the classpath.
touch classdist_noinst.stamp
CLASSPATH=.:./.:$CLASSPATH javac -d . org/zeromq/ZMQ.java org/zeromq/ZMQException.java org/zeromq/ZMQQueue.java org/zeromq/ZMQForwarder.java org/zeromq/ZMQStreamer.java
6.导航回/jzmq并运行make
6.Navigate back to the /jzmq and run make
cd ..
./autogen.sh
If you get this error "autogen.sh: error: could not find pkg-config.pkg-config is required to run autogen.sh", then install pkg-config. In Ubuntu sudo apt-get install pkg-config and again run the above command.
./configure
make
sudo make install
其中的一部分是从 Storm-安装本机依赖项和 Tijun-如何在Mac OS X Lion中构建jzmq .谢谢你们把拼图拼凑起来,我只是将它们拼在一起.
Parts of this were stitched together from the Storm - Installing Native Dependencies and Tijun - How to build jzmq in Mac OS X Lion. Thanks guys for putting your pieces of the puzzle up I just stitched them together.
这篇关于在Ubuntu上编译JZMQ的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!