LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-22-2009, 03:57 PM   #1
kapilbajpai88
Member
 
Registered: Jul 2008
Location: Bangalore, India
Distribution: RHEL
Posts: 235

Rep: Reputation: 41
Question Jre problem on RHEL-5


Hi All,

I have installed RHEL-5 on a 64-bit machine recently, and want to install java. Earlier when I did "java -version", it showed jre1.4.0. But for my application , I need jre 1.5.0 or later, so I decided to download jre1.6. I am the root user here and I downloaded the jre1.6 as rpm.bin as well as simple .bin format.

But the problem is that when I tried executing any of them, I am getting below error message :

" ./jre-6u16-linux-x64-rpm.bin: line 368: ./install.sfx.20520: cannot execute binary file"
Moreover, now when I tried "java -version", it is not showing any thing.

Could anybody suggest me how can I resolve this deadlock situation, as I need to install my other application at the earliest.

Many Thaks in advance,
Kapil.
 
Old 10-22-2009, 07:55 PM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016, Slack14.1 Deb Jessie, + 50+ other Linux OS, for test only.
Posts: 16,276

Rep: Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156
Corrupt package ? ?

The usual approach is :
# 'sh jre-6u16-linux-x64-rpm.bin'

You can also do 'chmod +x jre-6u16-linux-x64-rpm.bin'
and # ./jre-6u16-linux-x64-rpm.bin

cd /usr/bin/
# rm java
( java is a link to "..jre1.4.0.." ).

# 'ln -s /usr/java/jre1.6.0_16/bin/java'
'java -version' should then show " 1.6 ".
.....

Last edited by knudfl; 10-22-2009 at 08:20 PM.
 
Old 10-22-2009, 08:09 PM   #3
lutusp
Member
 
Registered: Sep 2009
Distribution: Fedora
Posts: 835

Rep: Reputation: 102Reputation: 102
Quote:
Originally Posted by kapilbajpai88 View Post
Hi All,

I have installed RHEL-5 on a 64-bit machine recently, and want to install java. Earlier when I did "java -version", it showed jre1.4.0. But for my application , I need jre 1.5.0 or later, so I decided to download jre1.6. I am the root user here and I downloaded the jre1.6 as rpm.bin as well as simple .bin format.

But the problem is that when I tried executing any of them, I am getting below error message :

" ./jre-6u16-linux-x64-rpm.bin: line 368: ./install.sfx.20520: cannot execute binary file"
Moreover, now when I tried "java -version", it is not showing any thing.

Could anybody suggest me how can I resolve this deadlock situation, as I need to install my other application at the earliest.

Many Thaks in advance,
Kapil.
This message usually means just what it says. In this case I suspect it means you didn't get a 64-bit JRE binary, in spite of its name. Or, the JRE is meant for a processor different than yours.

Have you tried using yum to get a reasonably up-to-date JRE? Or to replace the one you lost? You could assist the latter fix by uninstalling then reinstalling.
 
Old 10-22-2009, 08:32 PM   #4
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016, Slack14.1 Deb Jessie, + 50+ other Linux OS, for test only.
Posts: 16,276

Rep: Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156
# yum provides */java

The reply is : java-1.6.0-openjdk-1.6.0.0-0.30.b09.el5

.....

Last edited by knudfl; 10-22-2009 at 08:34 PM.
 
Old 10-23-2009, 03:41 PM   #5
kapilbajpai88
Member
 
Registered: Jul 2008
Location: Bangalore, India
Distribution: RHEL
Posts: 235

Original Poster
Rep: Reputation: 41
Question

Hi All,

Thank you for the prompt reply.
But I am still not able to install the java properly. As was suggested by KNUDLF, I did :
# cd /usr/bin
# rm java

Then I tried :
# sh jre-6u16-linux-x64-rpm.bin
but I got the below error :-

Unpacking...
Checksumming...
Extracting...
jre-6u16-linux-x64-rpm.bin: line 368: ./install.sfx.3296: cannot execute binary file

Done

Later when I did :
# yum list java*
it gave below putput:
Installed Packages
java-1.4.2-gcj-compat.i386 1.4.2.0-40jpp.112 installed
java-1.4.2-gcj-compat-devel.i386 1.4.2.0-40jpp.112 installed
java-1.4.2-gcj-compat-src.i386 1.4.2.0-40jpp.112 installed

Is it like java1.4.2.0 creating some problem ? What would be the problem, as this machine was working fine earlier, wheen we crashed RHEL-5, and Installed Windows-7. After that when we reinstalled RHEL-5, it is not taking java.

Regards,
Kapil
 
Old 10-23-2009, 04:40 PM   #6
colorpurple21859
Senior Member
 
Registered: Jan 2008
Location: florida
Distribution: slackware64-current, puppy, ubuntu
Posts: 1,953

Rep: Reputation: 267Reputation: 267Reputation: 267
Try using the non rpm bin file to install java, have to be root: get jre-6u16-linux-x64.bin from sun-java and copy to /usr and make sure it is executable.
Code:

cd /usr
./jre-6u16-linux-x64.bin
ln -sf /usr/jre1.6.0_16/bin/java /usr/bin/java
 
Old 10-23-2009, 04:47 PM   #7
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
Quote:
Code:
yum list java*
it gave below putput:
Installed Packages
java-1.4.2-gcj-compat.i386 1.4.2.0-40jpp.112 installed
java-1.4.2-gcj-compat-devel.i386 1.4.2.0-40jpp.112 installed
java-1.4.2-gcj-compat-src.i386 1.4.2.0-40jpp.112 installed
Well ... the hardware you're installing on may have a 64-bit
CPU, but the OS you've installed uses i386 packages. So that's
why your installer fails. The 32-bit OS can't run 64-bit
executables. Simple.



Cheers,
Tink
 
Old 10-23-2009, 05:36 PM   #8
kapilbajpai88
Member
 
Registered: Jul 2008
Location: Bangalore, India
Distribution: RHEL
Posts: 235

Original Poster
Rep: Reputation: 41
Question

Hi All,

Thank you for the reply.
So now it become a bit clear that we are using 64-bit java pludis , which are incompatible with 32-bit OS.

I beleive, the machine that I am using is a 64-bit OS. But I am putting the output of the uname command here :
# uname -a
Linux anthurium.strandls.com 2.6.18-53.el5 #1 SMP Wed Oct 10 16:34:02 EDT 2007 i686 i686 i386 GNU/Linux

If 64-bit java can't be installed over 32-bit OS, then could you please how can we install 32-bit java over RHEL-5? IS it the same place from where 32-bit java jre will be available, or there is some other way of getting and installing that ? If yes, then maybe I can search and give a try, but if not, what changes need to be made ?

Sorry, just too many questions, but forgive me , as I am really getting confuse now ....

Regards,
Kapil
 
Old 10-23-2009, 05:50 PM   #9
lutusp
Member
 
Registered: Sep 2009
Distribution: Fedora
Posts: 835

Rep: Reputation: 102Reputation: 102
Quote:
Originally Posted by kapilbajpai88 View Post
I beleive, the machine that I am using is a 64-bit OS.
No. The "uname" output clearly says "i686", meaning 32 bit.

Just download and install the 32-bit Java version. You have 64-bit hardware but you are running all 32-bit software including your OS. This is the actual meaning of the original error message.
 
Old 10-23-2009, 07:42 PM   #10
kapilbajpai88
Member
 
Registered: Jul 2008
Location: Bangalore, India
Distribution: RHEL
Posts: 235

Original Poster
Rep: Reputation: 41
Thumbs up

Hi All,

I wish to thank you all for the help, as the matter finally got resolved. I was using 32-bit RHEL5 OS over a 64-bit machine, and that was the problem as I downloaded the 64-bit java as well.

When it was indicated by one and all, then it become clear to me. I downloaded 32-bit java again, and installed that. it got installed and finally I set that as default as well. Now "java -version" is showing "java 1.6.0".

Thank you All Again,
Kapil.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Sun JRE versus GNU JRE frznchckn Linux - Software 3 05-19-2009 01:18 PM
JRE on firefox 2 problem vcatalano Ubuntu 8 01-21-2007 06:52 AM
jre install problem.. tehnick Linux - Software 6 03-29-2005 08:30 AM
JRE Problem Tr@ce Linux - Software 7 03-28-2005 10:40 PM
Jre 1.4.2 locale problem GruiX Linux - Software 8 03-06-2004 05:59 AM


All times are GMT -5. The time now is 08:51 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration