I ran into this while trying to install j2sdk1.4.2_09 on Fedora Core 4 (FC, FC4)
Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/j2sdk1.4.2_09/jre/lib/i386/libawt.so: libXp.so.6: cannot open shared object file: No such file or directory
And here is the result of my searching...
You need libXp.so.6, so here is how you find out where to get it
$ rpm --query --whatprovides 'libXp.so.6'
xorg-x11-deprecated-libs-6.8.2-37.FC4.49.2
There is an equivalent yum command, but I couldn't get it to work. Also installing xorg-x11 for good measure.
$ sudo yum install xorg-x11
$ sudo yum install xorg-x11-deprecated-libs
$ locate libXp.so.6
/usr/X11R6/lib/libXp.so.6.2
/usr/X11R6/lib/libXp.so.6
/usr/X11R6/lib64/libXp.so.6.2
/usr/X11R6/lib64/libXp.so.6
$ ldd /usr/local/java/jre/lib/i386/libawt.so
linux-gate.so.1 => (0xffffe000)
libmlib_image.so => not found
libjvm.so => not found
libXp.so.6 => not found
libXt.so.6 => /usr/X11R6/lib/libXt.so.6 (0xf7c8a000)
libXext.so.6 => /usr/X11R6/lib/libXext.so.6 (0xf7c7a000)
libXtst.so.6 => /usr/X11R6/lib/libXtst.so.6 (0xf7c74000)
libX11.so.6 => /usr/X11R6/lib/libX11.so.6 (0xf7ba0000)
libm.so.6 => /lib/libm.so.6 (0xf7b7c000)
libdl.so.2 => /lib/libdl.so.2 (0xf7b78000)
libjava.so => not found
libc.so.6 => /lib/libc.so.6 (0xf7a4d000)
libSM.so.6 => /usr/X11R6/lib/libSM.so.6 (0xf7a44000)
libICE.so.6 => /usr/X11R6/lib/libICE.so.6 (0xf7a2a000)
/lib/ld-linux.so.2 (0x56555000)
Things should be good at this point, but for some reason the /usr/X11R6/lib directory is not getting seen. If you do one of these and run ldd again, you'll see libXp.so.6 is finally found.
$ export LD_LIBRARY_PATH=/usr/X11R6/lib
$ ldd /usr/local/java/jre/lib/i386/libawt.so
linux-gate.so.1 => (0xffffe000)
libmlib_image.so => not found
libjvm.so => not found
libXp.so.6 => /usr/X11R6/lib/libXp.so.6 (0xf7cd7000)
libXt.so.6 => /usr/X11R6/lib/libXt.so.6 (0xf7c82000)
libXext.so.6 => /usr/X11R6/lib/libXext.so.6 (0xf7c72000)
libXtst.so.6 => /usr/X11R6/lib/libXtst.so.6 (0xf7c6c000)
libX11.so.6 => /usr/X11R6/lib/libX11.so.6 (0xf7b98000)
libm.so.6 => /lib/libm.so.6 (0xf7b74000)
libdl.so.2 => /lib/libdl.so.2 (0xf7b70000)
libjava.so => not found
libc.so.6 => /lib/libc.so.6 (0xf7a45000)
libSM.so.6 => /usr/X11R6/lib/libSM.so.6 (0xf7a3c000)
libICE.so.6 => /usr/X11R6/lib/libICE.so.6 (0xf7a22000)
/lib/ld-linux.so.2 (0x56555000)
it looks like the /etc/ld.so.conf file in FC4 is just an include for /etc/ld.so.conf.d/*.conf and it seems not to work
$ cat /etc/ld.so.conf
include ld.so.conf.d/*.conf
$ cat /etc/ld.so.conf.d/*
/usr/lib64/qt-3.3/lib
/usr/X11R6/lib
/usr/X11R6/lib64
I added this hack to my system to work around. Create this file in /etc/profile.d and give it the same perms as the others in that dir.
export LD_LIBRARY_PATH=$(cat /etc/ld.so.conf.d/* | tr '\n' ':')
