You are not logged in.

#1 2020-05-06 20:16:21

sfabius
Member
Registered: 2007-07-07
Posts: 157

Java error: could not find libjava.so

I am getting the following error when I try to run the ELAN binary (java-based):

ELAN_5-9]$ ./ELAN 
Error: could not find libjava.so
Error: Could not find Java SE Runtime Environment.

I have queried the forum but it hasn't led to solutions. Apparently this has been tested on Ubuntu, so one avenue is to explore whether there are any differences in implementation in java between Arch and Ubuntu (and because this seems to be Arch-specific, I'm posting here). I get the same error if I run as root.

This app is not widely used but essential for my work and I use Arch as my main OS. Thanks in advance for suggestions.

Offline

#2 2020-05-06 20:24:04

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: Java error: could not find libjava.so

Did you install the AUR package?


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2020-05-06 20:32:32

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,516
Website

Re: Java error: could not find libjava.so

sfabius wrote:

I get the same error if I run as root.

Why on earth would you try to run it as root?  If something fails and you don't know why, trying the same thing except with the option of completely destroying your system is not a troubleshooting step.  It's a trouble creating step.  Break that habit before it breaks your system.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#4 2020-05-07 13:28:56

sfabius
Member
Registered: 2007-07-07
Posts: 157

Re: Java error: could not find libjava.so

Trilby I am chastened. I thought perhaps it was a permission issue with java, but you are right, bad idea.

The AUR package builds from source, and was failing for me. Apparently there's an issue with their server which they are looking into,

They offer a binary for linux, seems like it should work.

Offline

#5 2020-05-07 13:37:35

schard
Forum Moderator
From: Hannover
Registered: 2016-05-06
Posts: 2,698
Website

Re: Java error: could not find libjava.so

Well, did you install a Java Runtime Environment?


Inofficial first vice president of the Rust Evangelism Strike Force

Offline

#6 2020-05-07 16:17:16

sfabius
Member
Registered: 2007-07-07
Posts: 157

Re: Java error: could not find libjava.so

Yes, and the app seems to come packaged with its own java. App has a config file with a path that I set to the library location (as suggested in the ELAN forum post - link in original post), but that did not help. In fact, there are multiple instances of this file on my system (which could be the problem but I've never fiddled with java, only installed required packages). I get the same error however on a newly-installed Manjaro system I was trying and my main Arch system. The first line here is the directory created by the binary distribution.

$ locate libjava.so
/home/kiesling/bin/ELAN_5-9/runtime/lib/libjava.so
/usr/lib/jvm/java-13-openjdk/lib/libjava.so
/usr/lib/jvm/java-8-openjdk/jre/lib/amd64/libjava.so

Offline

#7 2020-05-07 16:28:43

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,516
Website

Re: Java error: could not find libjava.so

And `echo $PATH`?


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#8 2020-05-07 17:40:35

sfabius
Member
Registered: 2007-07-07
Posts: 157

Re: Java error: could not find libjava.so

$ echo $PATH
/home/kiesling/.local/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/var/lib/snapd/snap/bin

And FWIW

$ java -version
openjdk version "1.8.0_242"
OpenJDK Runtime Environment (build 1.8.0_242-b08)
OpenJDK 64-Bit Server VM (build 25.242-b08, mixed mode)

Last edited by sfabius (2020-05-07 18:02:04)

Offline

#9 2020-05-08 13:58:58

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 15,392

Re: Java error: could not find libjava.so

output of archlinux-java status  ?

Does it help if you start the binary AFTER running these

    export JAVA_HOME=/usr/lib/jvm/java-8-openjdk/
    export PATH=/usr/lib/jvm/java-8-openjdk/bin:$PATH

?

(copied from the aur PKGBUILD for elan )


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#10 2020-05-08 15:11:29

sfabius
Member
Registered: 2007-07-07
Posts: 157

Re: Java error: could not find libjava.so

Nope. sad

$ archlinux-java status
Available Java environments:
  java-13-openjdk
  java-8-openjdk (default)

Last edited by sfabius (2020-05-08 15:19:28)

Offline

#11 2020-05-13 15:05:18

sfabius
Member
Registered: 2007-07-07
Posts: 157

Re: Java error: could not find libjava.so

Since this works on Ubuntu, is anyone aware of any differences in how Arch and Ubuntu deploy/install java? It seems like that might point to the solution.

Offline

#12 2020-05-15 15:30:08

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 15,392

Re: Java error: could not find libjava.so

Way to many differences between ubuntu and archlinux.
The mpi forum thread  suggests you found  a workaround using maven directly ?

Did you use maven from arch repos for that ?


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

Board footer

Powered by FluxBB