Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

RHEL 5.7 Java installation

Posted on 2014-11-10
10
Medium Priority
?
358 Views
Last Modified: 2014-12-01
Hi

I am trying to install java jdk-1.7.0_25
 I removed the existing version of java  rm -r jdk1.6.0.27 (deleting file by file) which was installed using self-extracting file.
Than downloaded the jdk-7u25-linux-64.rpm.

Executed the command: rpm –ivh jdk-7u25-linux-x64.rpm
After that:

alternatives --install /usr/bin/java java /usr/java/jdk-1.7.0_25/bin/java 20000
alternatives --install /usr/bin/javac javac /usr/java/jdk-1.7.0_25/bin/javac 20000

After that

alternatives  --config java
alternatives  --config javac

and I set the /usr/java/jdk-1.7.0_25/bin/java as the java version
the same for javac

now when I type: java -version

it returns

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

The  command: type java
Returns:
java is hashed (/usr/java/jdk1.6.0_27/bin/java)

Could you please help me to solve this problem?

Thank you in advance
alternatives --config java
0
Comment
Question by:claud53
10 Comments
 

Author Comment

by:claud53
ID: 40432472
Another thing:
When I type the command rpm -qa jdk
it returns
jdk-1.7.0_25-fcs
this is the correct version.
0
 

Author Comment

by:claud53
ID: 40432489
Hi again:

I used the command:
ls -l $(locate libjli.so)

it returns:

-rwxr-xr-x 1 root root 105728 Jun 6 2013 /usr/java/jdk1.7.0_25/jre/lib/amd64/jli/libjli.so
0
 
LVL 23

Expert Comment

by:savone
ID: 40432519
Why not use yum?

yum list jdk*
0
Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

 

Author Comment

by:claud53
ID: 40432537
Because I am using RHEL 5.7 without subscription
0
 

Author Comment

by:claud53
ID: 40432538
It expired lately
0
 
LVL 23

Expert Comment

by:savone
ID: 40432547
You are going to run into a lot of problems and dependency hell.  My suggestion to you would be either but a subscription or move to CentOS.
0
 

Author Comment

by:claud53
ID: 40432560
As you may understand from my comments I am new to RHEL (and linux).  RHEL 5.7 is not supported anymore according to someone I contacted online. The lowest supported version is 5.11.
If i move to CentOS do I have to the same features. Do I have to be online connected to the internet to use yum
0
 
LVL 23

Assisted Solution

by:savone
savone earned 750 total points
ID: 40432597
You have all the same features with CentOS.  You do not HAVE to be connected to the internet to use yum, but it makes life a lot easier.
0
 
LVL 36

Expert Comment

by:Seth Simmons
ID: 40432918
libjli.so: cannot open shared object file

try this
create this file - /etc/ld.so.conf.d/java.conf
and put in it the path to that library; in this case /usr/java/jdk1.7.0_25/jre/lib/amd64/jli/
then run /sbin/ldconfig as root
0
 
LVL 62

Accepted Solution

by:
gheist earned 750 total points
ID: 40433945
You need to rpm -e whatever java you have on system deleting folder leaves library paths broken.
0

Featured Post

Veeam Task Manager for Hyper-V

Task Manager for Hyper-V provides critical information that allows you to monitor Hyper-V performance by displaying real-time views of CPU and memory at the individual VM-level, so you can quickly identify which VMs are using host resources.

Question has a verified solution.

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

How many times have you wanted to quickly do the same thing to a list but found yourself typing it again and again? I first figured out a small time saver with the up arrow to recall the last command but that can only get you so far if you have a bi…
Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
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.
Suggested Courses
Course of the Month8 days, 2 hours left to enroll

824 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