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:
(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,
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
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:
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?
> ... 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
Let me know if you still can't get it to work.
RE: Installing Java SDK...
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:
I Also recommend installing NetBeans using yum repository. the only thing you have to install manually is GlassFish.
The bottom line is that there is something wrong with your system's configuration -- it's missing something essential.
> 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:
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.
> ... 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.
> 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.
you are right -- binary wasn't what I mean't to say
Thanks for the correction :D
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.
|All times are GMT -5. The time now is 06:17 AM.|