Wednesday, August 26, 2015

Oracle Java, SmartOS Centos 6 LX branded zone: error while loading shared libraries libjli.so

SmartOS 20150820T062742Z

centos-6 lx-dataset image_uuid b1e082f6-460d-11e5-991a-0bc7df451392 (version 20150819)

I don't know if this happens in other versions or linux distributions.

I've installed Java (using the tar.gz archive downloaded from Oracle). Java 6 and Java 7: same issue.

/usr/java/latest/bin/java: error while loading shared libraries: libjli.so: cannot open shared object file: No such file or directory

Weird:

 # ldd /usr/java/latest/bin/java
lx_vdso.so.1 =>  (0x00007fffff0b0000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007ffffee00000)
libjli.so => /usr/java/latest/bin/../lib/amd64/jli/libjli.so (0x00007ffffecf5000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007ffffea00000)
libc.so.6 => /lib64/libc.so.6 (0x00007ffffe600000)
/lib64/ld-linux-x86-64.so.2 (0x00007fffff200000)


Solution:

Create the file /etc/ld.so.conf.d/java.conf and put the following line in it

/usr/java/latest/lib/amd64/jli/

Then run the /sbin/ldconfig command.

# /usr/java/latest/bin/java -version
java version "1.6.0_65"
Java(TM) SE Runtime Environment (build 1.6.0_65-b32)
Java HotSpot(TM) 64-Bit Server VM (build 20.65-b04, mixed mode)

# ldd /usr/java/latest/bin/java         
lx_vdso.so.1 =>  (0x00007fffff0b0000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007ffffee00000)
libjli.so => /usr/java/latest/bin/../lib/amd64/jli/libjli.so (0x00007ffffecf5000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007ffffea00000)
libc.so.6 => /lib64/libc.so.6 (0x00007ffffe600000)
/lib64/ld-linux-x86-64.so.2 (0x00007fffff200000)

Thursday, August 20, 2015

How to expand GLPI entity tree sons by default

vi ajax/entitytreesons.php

...

 83                   $path['state'] = 'open';
...

119                   $path['state'] = 'open';
...