LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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 09-29-2009, 08:33 PM   #1
Kris Jacyna
LQ Newbie
 
Registered: Sep 2009
Posts: 3

Rep: Reputation: 0
Installing Java SDK...


Hey guys, im new to linux and java for that mattter. I am studying computer science at university and we are using linux fedora 10.

I have downloaded and installed this version of linux at home.
Could someone please help me with instructions on how to insall java?
(eg. so i can compile programs in command line. "javac......etc")
i am having great difficulty with trying to do this. I have downloaded the latest version of the Java EE 6 SDK from the sun website but when i try to install it, it throws up the message:

java_ee_sdk-5_07-jdk-6u16-linux.bin: error while loading shared libraries: libstdc++.so.5: cannot open shared object file: No such file or directory

So then i searched the net and downloaded the file:
compat-libstdc++-33-3.2.3-64.i386.rpm
(which people seemed to say would fix this issue)

But when i try to install this file, it says "Cannot execute binary file"

If someone could help me id be so grateful as it is getting extremely frustrating now lol.

Thanks in advance,
Kris
 
Old 09-29-2009, 08:52 PM   #2
lutusp
Member
 
Registered: Sep 2009
Distribution: Fedora
Posts: 835

Rep: Reputation: 102Reputation: 102
Quote:
Originally Posted by Kris Jacyna View Post
Hey guys, im new to linux and java for that mattter. I am studying computer science at university and we are using linux fedora 10.

I have downloaded and installed this version of linux at home.
Could someone please help me with instructions on how to insall java?
(eg. so i can compile programs in command line. "javac......etc")
i am having great difficulty with trying to do this. I have downloaded the latest version of the Java EE 6 SDK from the sun website but when i try to install it, it throws up the message:

java_ee_sdk-5_07-jdk-6u16-linux.bin: error while loading shared libraries: libstdc++.so.5: cannot open shared object file: No such file or directory

So then i searched the net and downloaded the file:
compat-libstdc++-33-3.2.3-64.i386.rpm
(which people seemed to say would fix this issue)

But when i try to install this file, it says "Cannot execute binary file"

If someone could help me id be so grateful as it is getting extremely frustrating now lol.

Thanks in advance,
Kris
Why not install the requred library using a package manager? Doing it this way assures you get the right version of the library and any dependencies.

Code:
# yum install libstdc++
Then you can install Java.
 
Old 09-30-2009, 08:14 AM   #3
parkercombes
LQ Newbie
 
Registered: Jan 2005
Posts: 2

Rep: Reputation: 0
I agree with the above post, but I thought I'd provide a little more info if you want it, since you're new. Fedora/Red Hat packages are *.rpm files. Other distributions like Debian/Ubuntu have other package names i.e. *.deb. For the .bin file you have please look at this post
 
Old 09-30-2009, 05:29 PM   #4
Kris Jacyna
LQ Newbie
 
Registered: Sep 2009
Posts: 3

Original Poster
Rep: Reputation: 0
Thanks for the response guys. I ran the code that lutusp suggested and it ran through a few things, but finished up by saying "nothing to do".
I tried to install the java file i have again but still throws up the same error as before.

The file i am trying to install is named:
java_ee_sdk-5_07-jdk-6u16-linux.bin

When i try to install this file i am following the instructions shown in the thread that parkercombes posted the link to.

Any ideas on what steps to take next?
 
Old 09-30-2009, 09:25 PM   #5
thomas.hedden
Member
 
Registered: May 2006
Location: Carlisle, MA
Distribution: Ubuntu, Fedora
Posts: 60

Rep: Reputation: 16
Hello Kris,

> ... fedora 10 ...
> Could someone please help me with instructions on how to install java?
> ... error while loading shared libraries: libstdc++.so.5: ...
First, I strongly agree with lutusp ...
> Why not install the required library using a package manager?
Many programs have dependencies that have other dependencies, etc., and
these dependencies are all worked out if the programs are installed via
a package manager. If you try to install program A without program B,
but program B is required for program A to work, then the package manager
will tell you so, and ask you whether you want to install program B, too.

For Fedora 11 (and probably 10 as well), this can be done through the
menu commands: System | Administration | Add/Remove Software
There is also the command-line tool "yum".

I assume that you installed the basic development packages when you
installed Fedora. If not, then do so. Then, search for what is
missing (libstdc++.so.5) in "Add/Remove Software": This should find
what you need to install.

> # yum install libstdc++
I think that the reason why this didn't help is because your
libstdc++ library is up-to-date, in fact MORE up-to-date than
what is required for what you want to do. I seem to recall
that the problem that you are having is that your system has a
LATER version of the library installed than the one required for
the program you want to install, but the program you want to
install won't accept this later version. If memory serves, in this
case you can also install the older "compatibility" version.

Unless you're already a whiz at using RPMs, I would abandon that
approach and just follow the steps I outlined above.

I also strongly recommend regularly updating your system, so that
things don't get so far out of date that they can't be updated
anymore.

Let me know if you still can't get it to work.

Best regards,

Tom
 
Old 10-01-2009, 01:08 AM   #6
hilel14
LQ Newbie
 
Registered: Mar 2008
Distribution: Fedora
Posts: 3

Rep: Reputation: 0
RE: Installing Java SDK...

Quote:
Originally Posted by Kris Jacyna View Post
Thanks for the response guys. I ran the code that lutusp suggested and it ran through a few things, but finished up by saying "nothing to do".
I tried to install the java file i have again but still throws up the same error as before.

The file i am trying to install is named:
java_ee_sdk-5_07-jdk-6u16-linux.bin

When i try to install this file i am following the instructions shown in the thread that parkercombes posted the link to.

Any ideas on what steps to take next?

First, the command you are looking for is
yum install compat-libstdc++-33

Second, unless you need some Java EE specific features, you can install the Java Developer Kit - Standard Edition. You can see what java packages are available for you with this command:

yum list *openjdk*

On my Fedora 11, for example, I have this one installed:

java-1.6.0-openjdk-devel

I Also recommend installing NetBeans using yum repository. the only thing you have to install manually is GlassFish.
 
Old 10-01-2009, 01:37 AM   #7
lutusp
Member
 
Registered: Sep 2009
Distribution: Fedora
Posts: 835

Rep: Reputation: 102Reputation: 102
Quote:
Originally Posted by Kris Jacyna View Post
Thanks for the response guys. I ran the code that lutusp suggested and it ran through a few things, but finished up by saying "nothing to do".
I tried to install the java file i have again but still throws up the same error as before.

The file i am trying to install is named:
java_ee_sdk-5_07-jdk-6u16-linux.bin

When i try to install this file i am following the instructions shown in the thread that parkercombes posted the link to.

Any ideas on what steps to take next?
Quote:
it ran through a few things, but finished up by saying "nothing to do".
This means you already have the required library installed UNLESS you have been deleting libraries randomly. Try reinstalling the compiler libraries:

Code:
# yum reinstall libstdc++
This is normally a trouble-free installation. I have never heard of a case like this, and I develop Java programs regularly.

The bottom line is that there is something wrong with your system's configuration -- it's missing something essential.
 
Old 10-01-2009, 07:25 AM   #8
thomas.hedden
Member
 
Registered: May 2006
Location: Carlisle, MA
Distribution: Ubuntu, Fedora
Posts: 60

Rep: Reputation: 16
lutusp wrote:
> This means you already have the required library
> installed UNLESS you have been deleting libraries
> randomly. Try reinstalling the compiler libraries:
> # yum reinstall libstdc++[/CODE]
> The bottom line is that there is something wrong
> with your system's configuration -- it's missing
> something essential.
I don't think so. See my post. I think that the
problem is that the libraries are installed, but
that their version is LATER than the one required,
and the SDK is demanding an EARLIER version. This
is why the usual yum installation isn't helping.
It's working fine, but that's not the problem.

I haven't checked it, but the suggestion by hilel14
might accomplish what you need to do, however, I do
want to emphasize that this is not the last time
you will encounter problems of this type, and that
you should learn how to pinpoint problems of this
type on your own. Instead of simply issuing the
command and forgetting about all this, I still
strongly suggest that you pursue the matter through
the graphical package manager:
System | Administration | Add/Remove Software
If you search for libstdc++ without version number,
you might very well see both versions so that you
can verify what I'm saying. Look at the version
you have installed, and see what files it contains.
I'll bet it contains the file "libstdc++.so.6"
(ending in ".6" instead of ".5"). If you look at
the older versions of this library, I think you'll
find that there is one that contains the file you
need, namely "libstdc++.so.5".

Another easy thing you try to verify this is to
search your computer for the file(s) in question.
Try issuing this command:
$ find / -name libstdc++.so.6 -print 2>/dev/null
I'll bet this command returns something like:
/usr/lib/libstdc++.so.6
That will show that you have a later version of the
library installed than the one you need.

Please let me know if you don't get it working.

Best regards,

Tom
 
Old 10-01-2009, 07:29 AM   #9
reg.doug
LQ Newbie
 
Registered: Aug 2009
Location: Very far north
Distribution: openSuSE, Arch
Posts: 14

Rep: Reputation: 0
Quote:
Originally Posted by Kris Jacyna View Post
So then i searched the net and downloaded the file:
compat-libstdc++-33-3.2.3-64.i386.rpm
(which people seemed to say would fix this issue)

But when i try to install this file, it says "Cannot execute binary file"
RPMs are not binary files. You install them with the command
Code:
# rpm -i `rpm_name`
As other people have noted, using yum is preferrable, but you could try this if nothing else works.
 
Old 10-01-2009, 07:31 AM   #10
thomas.hedden
Member
 
Registered: May 2006
Location: Carlisle, MA
Distribution: Ubuntu, Fedora
Posts: 60

Rep: Reputation: 16
P.S.
> ... libstdc++ ... version ...
> ... "libstdc++.so.6" ... "libstdc++.so.5".
In this case, I'm pretty sure that you can
have both versions installed. Just go ahead
and install the old one in addition to the
one that you have installed, and do so
through the package manager. It will complain
at you if you should not do this for some reason.

Best regards,

Tom
 
Old 10-01-2009, 02:21 PM   #11
thomas.hedden
Member
 
Registered: May 2006
Location: Carlisle, MA
Distribution: Ubuntu, Fedora
Posts: 60

Rep: Reputation: 16
reg.doug wrote:
> RPMs are not binary files.
> You install them with the command ...
I think that what you mean to say is
that RPMS are not EXECUTABLE files.
They are in fact binary files. If you
open a terminal window and type ...
$ head RPM_PACKAGE_NAME.rpm
... you'll see that this is true.
Tom
 
Old 10-02-2009, 07:06 AM   #12
reg.doug
LQ Newbie
 
Registered: Aug 2009
Location: Very far north
Distribution: openSuSE, Arch
Posts: 14

Rep: Reputation: 0
Tom

you are right -- binary wasn't what I mean't to say

Thanks for the correction
 
Old 10-03-2009, 05:49 PM   #13
Kris Jacyna
LQ Newbie
 
Registered: Sep 2009
Posts: 3

Original Poster
Rep: Reputation: 0
Hey people!
Thank you all so much for your help and it worked. I managed to install the correct files from the software manager and Java EE installed no problems.

Thanks again,

Kris.
 
  


Reply

Tags
installation, java, libstdc++, manager, package, sdk, yum



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
Installing Java SDK and Eclipse techdawg270 Fedora 10 07-03-2007 05:41 PM
Problems installing Java SDK 1.5.0 harshnoise Programming 2 02-19-2006 03:30 PM
Installing Java SDK 1.4.2_05 hevykevy7 Linux - Software 4 09-11-2004 04:39 AM
Installing JAVA SDK 1.3 on RedHat7.3 jenze76 Linux - Software 2 08-15-2004 10:31 AM
Installing Java SDK 1.4.2 grrr........... hadding Linux - Newbie 1 11-09-2003 07:25 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:02 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
Open Source Consulting | Domain Registration