Solved

Java in linux: cannot find libjli.so

Posted on 2014-02-24
6
4,480 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
Comment Utility
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
Comment Utility
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
Comment Utility
how did you install it?  tarball or rpm?
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 13

Expert Comment

by:Sandy
Comment Utility
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
Comment Utility
@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
Comment Utility
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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

This document is written for Red Hat Enterprise Linux AS release 4 and ORACLE 10g.  Earlier releases can be installed using this document as well however there are some additional steps for packages to be installed see Metalink. Disclaimer: I hav…
If you use Debian 6 Squeeze and you are tired of looking at the childish graphical GDM login screen that is used by default, here's an easy way to change it. If you've already tried to change it you've probably discovered that none of the old met…
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…

771 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

10 Experts available now in Live!

Get 1:1 Help Now