9

On 64-bit RHEL5 running Java 1.6.0 update 16, root can successfully run a Java program but a user can't because libjli.so supposedly can't be found. SELinux is turned off and the environment is the same before the program is run. I've tried putting libjli.so in the LD_LIBRARY_PATH but it doesn't make a difference.

How do I fix this error?

joeforker
  • 2,349
  • 4
  • 25
  • 34

1 Answers1

9

The first possibility that springs to mind is that libjli.so is readable only by root. So step one:

ls -l $(locate libjli.so)

If it's in an odd location (not in /usr/lib or /lib) create the file /etc/ld.so.conf.d/java.conf containing the path to the directory containing libjli.so and run /sbin/ldconfig as root.

For more troubleshooting info, run this command, once as root and once as a non-root user:

ldd java

In a sane world, the output of the two would be identical. How they differ should tell you a lot about why this is failing.

Insyte
  • 9,314
  • 2
  • 27
  • 45
  • Sheesh, I had set LD_LIBRARY_PATH, I thought ldconfig's conf would be fruitless. ldd java returns a relative path containing '..' for libjli, I guess that didn't work out as the packagers hoped for this particular Java 1.6.0 update 16 FCS client. – joeforker Aug 24 '09 at 19:15