Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question
add comment

1 Answer

up vote 3 down vote accepted

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.

share|improve this answer
    
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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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