Thursday, August 24, 2006

Sun JDK1.3.1

I needed to install Sun's Java SDK v1.3.1, so I downloaded and installed j2sdk-1_3_1_18-linux-i586. However, when attempting to run it the following error was produced.
$ /opt/jdk1.3.1_18/bin/java
/opt/jdk1.3.1_18/bin/i386/native_threads/java: error while loading shared libraries: libstdc++-libc6.1-1.so.2: cannot open shared object file: No such file or directory
To workaround this I installed the GNU stdc++ library (libstdc++2.10-glibc2.2) using Synaptic. This creates the file /usr/lib/libstdc++-3-libc6.2-2-2.10.0.so which I then symlinked to libstdc++-libc6.1-1.so.2 as follows:
$ cd /usr/lib
$ sudo ln -s libstdc++-3-libc6.2-2-2.10.0.so libstdc++-libc6.1-1.so.2

7 comments:

Chetan K. Sachdev said...

could you please give the link of c++ library rpm so that I can download it. I am facing the same problem.

ChrisP said...

Chetan,

Ubuntu is based on Debian and so doesn't use RPMs (it uses .DEB packages).

I suspect all you need to do is install the RPM(s) for the GNU stdc++ library, which ought to provide libstdc++-3-libc6 shared library.

Good luck,
Chris.

Cyber Samurai said...

Thanks! - Your posting help me solve my problem with a linux VPN client.

- CyberSamurai

yesidh said...

It worked, thanks.

dfreniche said...

It worked perfectly for me (Ubuntu 7.10) but I think you forgot to tell everyone to cd /usr/lib previously or use an absolute path:
ln -s /usr/lib/libstdc++-3-libc6.2-2-2.10.0.so /usr/lib/libstdc++-libc6.1-1.so.2
Thanks a lot!

PD: nice blog, by the way! I also own a Dell Inspiron 9400! Lots of useful info here!

ChrisP said...

Well spotted, dfreniche. Corrected.

Thanks,
Chris.

Anonymous said...

Useful also for ubuntu 7.10 and JDK1.4, thanks!
Maner