jzmq does not build in ubuntu 12.04

Its been working flawlessly on ubuntu 11 and 10, but once we move the env to 12.04, the compilation failed on “make“:

ubuntu@ip-10-72-110-107:~/zeromq-jzmq-fe47a77$ make
Making all in src
make[1]: Entering directory /home/ubuntu/zeromq-jzmq-fe47a77/src' make[1]: *** No rule to make targetclassdist_noinst.stamp’, needed by org/zeromq/ZMQ.class'. Stop. make[1]: Leaving directory/home/ubuntu/zeromq-jzmq-fe47a77/src’
make: *** [all-recursive] Error 1

and here is the solution

Detail step on Ubuntu 12.04

touch src/classdist_noinst.stamp
cd src/
CLASSPATH=.:./.:$CLASSPATH javac -d . org/zeromq/ZMQ.java org/zeromq/App.java org/zeromq/ZMQForwarder.java org/zeromq/EmbeddedLibraryTools.java org/zeromq/ZMQQueue.java org/zeromq/ZMQStreamer.java org/zeromq/ZMQException.java
cd ..

Another solution :

It looks like automake used to use classdist_noinst.stamp as a flag file, and has since switched toclassnoinst.stamp.

Changing classdist_noinst.stamp to classnoinst.stamp in src/Makefile.am and then re-running./autogen.sh seems to fix the issue, though I’m not sure how to handle that in a way that works for all versions of automake.


Installing JZMQ cannot find javah and jar

This is the step by step for installing JZMQ. 

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

cd jzmq/


sudo make install

while i run ./configure I face several error log like this 

checking for javac… javac
checking for javah… no
configure: error: cannot find javah

here is the solution step :

  1. edit file ~/.bashrc
  2. add the following line, then run this command –>  source ~/.bashrc to update your bashrc configuration

export JAVA_HOME=/usr/lib/jvm/jdk1.7.0_21
export JAVAH=/usr/lib/jvm/jdk1.7.0_21/bin/javah

export JAR=/usr/lib/jvm/jdk1.7.0_21/bin/jar

note : change the java path with your current java installation directory path

then continue running the installation step

  • ./configure
  • make
  • sudo make install

Getting JRI works for R and Java

First, I would like to thanks to Fei for the very useful tutorial,

I try several times to setup the environment, and try some configuration to get JRI works with Java. then I faced exactly the same problem.

I already have these following environment to run the program

  • OS : Ubuntu 12.04.2
  • Java : JDK 1.7.0_21
  • R : 3.1.0

I downloaded the JRI from this site : http://rforge.net/JRI/files/, and when I try running test program for JRI, I get this following error :

“cannot find JRI native library”

You need to copy the “libjri.so” to “java.library.path”. Use following to show the path:

in your java program :

  • System.out.println(System.getProperty(“java.library.path”));

Since I already jave rjava installed, first i find where my “libjri.so” located then copy to java.library.path :

  • $ locate libR.so
  • /usr/local/lib/R/site-library/rJava/jri/libjri.so
  • $sudo cp /usr/local/lib/R/site-library/rJava/jri/libjri.so /usr/lib

Another error coming:

cannot find system Renviron

For this error, this solution works for me :

  • setup the environment in Eclipse, inside Run > Run Configuration > Environment , add new env R_HOME, and the value is your R (in my case : /usr/lib/R)

Or you can try these several solutions :

  • set up system environment variables for R_HOME (works for whole Eclipse) inside ~/.bashrc
  • try this command : $ sudo chmod 644 /etc/R/Renviron

Reference :


  1. https://autofei.wordpress.com/2010/08/
  2. https://help.ubuntu.com/community/EnvironmentVariables
  3. http://sonivis.org/wiki/index.php/Installation_GNU_R
  4. Script: http://sonivis.org/startupEclipse
  5. http://sonivis.org/wiki/index.php/Troubleshooting#cannot_find_system_Renviron
  6. http://blog.pingoured.fr/index.php?post/2009/03/23/Getting-rJava/JRI-to-work%3A