Estou tentando iniciar o java:
$ java -version
java: error while loading shared libraries: libjli.so: cannot open shared object file: No such file or directory
$ ldd /usr/lib/jvm/java-6-openjdk/jre/bin/java
linux-gate.so.1 => (0xb779f000)
libz.so.1 => /usr/lib/libz.so.1 (0xb7780000)
libpthread.so.0 => /lib/i686/cmov/libpthread.so.0 (0xb7767000)
libjli.so => /usr/lib/jvm/java-6-openjdk/jre/bin/../lib/i386/jli/libjli.so (0xb7762000)
libdl.so.2 => /lib/i686/cmov/libdl.so.2 (0xb775e000)
libc.so.6 => /lib/i686/cmov/libc.so.6 (0xb7603000)
/lib/ld-linux.so.2 (0xb77a0000
$ ls /usr/lib/jvm/java-6-openjdk/jre/bin/../lib/i386/jli/
libjli.so
Mas o java funciona como root:
$ sudo java -version
java version "1.6.0_18"
OpenJDK Runtime Environment (IcedTea6 1.8.7) (6b18-1.8.7-2~lenny1)
OpenJDK Client VM (build 14.0-b16, mixed mode, sharing)
UPD:
/ usr / lib / jvm / java-6-openjdk / jre / bin / java é realmente meu comando java:
$ type java
java is hashed (/usr/bin/java)
$ ls -l /usr/bin/java
lrwxrwxrwx 1 root root 22 Jul 14 10:15 /usr/bin/java -> /etc/alternatives/java
$ ls -l /etc/alternatives/java
lrwxrwxrwx 1 root root 40 Jul 14 10:36 /etc/alternatives/java -> /usr/lib/jvm/java-6-openjdk/jre/bin/java
UPD2:
Eu também tentei definir PATH raiz:
$ sudo su
# echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
# exit
$ export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
$ java -version
java: error while loading shared libraries: libjli.so: cannot open shared object file: No such file or directory
UPD3:
Eu tentei:
# comm -3 <(declare | sort) <(declare -f | sort)
sob raiz. Mas não há variáveis de ambiente utilizáveis para java.
UPD4:
strace -f java -version
resultado: http://dumpz.org/67368/
strace -f java -version
e publique a saída.