Solved

Java in linux: cannot find libjli.so

Posted on 2014-02-24
6
4,597 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
Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

 
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 61

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
Fine Tune your automatic Updates for Ubuntu / Debian
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

920 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now