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?

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.

1
  • 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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.