I'm trying to use Weka with python-weka-wrapper on my Raspberry Pi.

I have to install javabridge to use the wrapper but I got the above mentioned error when I run

sudo pip install javabridge

I also tried to download javabridge and run setup.py but got the same error. JAVA_HOME environment variable is set to JAVA_HOME=/usr/lib/jvm/jdk-8-oracle-arm32-vfp-hflt

1 Answer 1


The error message tells you that the gnu linker (ld) did not find the library jvm.a (static link) or jvm.so (dynamic link - like dlls at Windows) in its search path. By default the JAVA_HOME path is not in the LD_LIBRARY path.

But the setup.py script does some magic (finding the jdk path, configuring the ld path,...). On a Linux system it uses the JAVA_HOME path variable from its (setup.py-process) environment.

Knowing your statements above (which are quite few ;-) ), it should work.

So what could be wrong?

1st) You said you set the JAVA_HOME variable, but did you export it? You can test it by entering


on the command line. You'll get a list with all exported variables. If JAVA_HOME is not contained. You can enter

export JAVA_HOME=/usr/lib/jvm/jdk-8-oracle-arm32-vfp-hflt
python setup.py

2nd) You said that JAVA_HOME points to /usr/lib/jvm/jdk-8-oracle-arm32-vfp-hflt. Does this directory exists and is it a complete JDK installation. Try to


Does this change the directory? Is there a lib subdirectory that containes a jvm.a or jvm.so file?

I would suggest you try this at first. Perhaps it will work or brings you to some clues. And comment my answer if there are some further questions. Hope this helps.

  • Sorry for coming back a bit late and thank you for your help. Actually I exported it with my profile and then I tried to install it the root and I guess the root and profile have different variables. When exported it with root and installed it with root, it worked. Commented Apr 29, 2016 at 9:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.