[zeromq-dev] ubuntu : Error: could not find libjava.so when trying to compile java already installed

Meir Yanovich meiry242 at gmail.com
Sun Dec 9 13:18:58 CET 2012

hello all
i trying to compile zeromq jzmq lib in linux ,
but when i get error when the make gettes to this point :

     jzmq-master$ jar cf  zmq.jar org/zeromq/*.class
    Error: could not find libjava.so
    Error: could not find Java 2 Runtime Environment.

i do have all java jdk installed m and its the only java i have in the system:
i did :

    @ubuntu:/usr/lib/jvm$ ls -l $(locate libjava.so)
    -rwxr-xr-x 1 root root 189222 2012-09-24 12:09

and this :

    /usr/bin$ ldconfig -p | grep java
    	libjavaplugin_nscp_gcc29.so (libc6, hwcap: 0x0001000000000000) =>
    	libjavaplugin_nscp.so (libc6, hwcap: 0x0001000000000000) =>
    	libjavaplugin_jni.so (libc6, hwcap: 0x0001000000000000) =>
    	libjava_crw_demo.so (libc6, hwcap: 0x0001000000000000) =>
    	libjava.so (libc6, hwcap: 0x0001000000000000) =>

and this is how my  vim /etc/ld.so.conf looks like :

    include /etc/ld.so.conf.d/*.conf

and even checked this:

    ldd java
    	linux-gate.so.1 =>  (0x00a2a000)
    	libpthread.so.0 => /lib/tls/i686/cmov/libpthread.so.0 (0x001d1000)
    	libjli.so => /usr/lib/jvm/jre/lib/i386/jli/libjli.so (0x00321000)
    	libdl.so.2 => /lib/tls/i686/cmov/libdl.so.2 (0x00130000)
    	libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0x00643000)
    	/lib/ld-linux.so.2 (0x00887000)

all looks right but no matter what i still get this error.

More information about the zeromq-dev mailing list