Solved

Java in linux: cannot find libjli.so

Posted on 2014-02-24
6
4,735 Views
Last Modified: 2014-03-04
I'm working in red hat linux enterpise server 5 with JDK 1.7.  When i do java -version of javac -version, i get:

 java: error while loading shared libraries: libjli.so: cannot open shared object file: No such file or directory

Not sure what to do.  Output of echo %PATH /usr/kerberos/sbin:/usr/java/jdk1.7.0_51/bin:/usr/kerberos/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/home/Office/bin

output of echo $JAVA_HOME

usr/java/jdk1.7.0_51

which java and which javac gives me

usr/java/jdk1.7.0_51
0
Comment
Question by:HyperBPP
6 Comments
 
LVL 34

Expert Comment

by:Seth Simmons
ID: 39883579
find the libjli.so file first

ls -l $(locate libjli.so)

if you don't find it in the common library folders (/lib, /usr/lib) then edit or create /etc/ld.so.conf.d/java.conf and add the path to where libjli.so resides then (as root or with sudo) run ldconfig then try again
0
 
LVL 6

Author Comment

by:HyperBPP
ID: 39883648
Well, it changed the message :)... Now it says:

Error: could not find libjava.so

Error: Could not find Java SE Runtime Environment.
0
 
LVL 34

Expert Comment

by:Seth Simmons
ID: 39884621
how did you install it?  tarball or rpm?
0
Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

 
LVL 13

Expert Comment

by:Sandy
ID: 39884851
Take it externally and create the soft link to required location it will work.. I have seen similar issue while working on RHEL 5/6

TY/SA
0
 
LVL 6

Author Comment

by:HyperBPP
ID: 39886597
@seth simmons... I installed RPM

@Sandy.... Take externally?  Move out of the folder it is installed in?  Is there article you could point me to to do this?  I'm a linux novice.
0
 
LVL 62

Accepted Solution

by:
gheist earned 500 total points
ID: 39897901
No you did not install rpm

yum install java-1.7.0\* installs rpm and places it as default java
You override PATH, so actually you never reach other than your handmade java install.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
Fine Tune your automatic Updates for Ubuntu / Debian
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question