Solved

Java in linux: cannot find libjli.so

Posted on 2014-02-24
6
4,818 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 35

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 35

Expert Comment

by:Seth Simmons
ID: 39884621
how did you install it?  tarball or rpm?
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

Question has a verified solution.

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

Suggested Solutions

Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
The purpose of this article is to show how we can create Linux Mint virtual machine using Oracle Virtual Box. To install Linux Mint we have to download the ISO file from its website i.e. http://www.linuxmint.com. Once you open the link you will see …
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.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

730 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