Solved

Java in linux: cannot find libjli.so

Posted on 2014-02-24
6
4,678 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
Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

 
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

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

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

SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
Google Drive is extremely cheap offsite storage, and it's even possible to get extra storage for free for two years.  You can use the free account 15GB, and if you have an Android device..when you install Google Drive for the first time it will give…
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…
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