java安装的时候,一个依赖的so文件提示报错
ldd /usr/bin/java
linux-vdso.so.1 => (0x00007fffba769000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00000038c4000000)
libjli.so => not found
libdl.so.2 => /lib64/libdl.so.2 (0x0000003da7c00000)
libc.so.6 => /lib64/libc.so.6 (0x0000003da7400000)
/lib64/ld-linux-x86-64.so.2 (0x0000003da6c00000)
其实这个so文件在java的安装包中是有的,只是没有添加了ld_path 里面,
解决办法:
rpm -ql jdk1.8.0_45|grep libjli
/usr/java/jdk1.8.0_45/jre/lib/amd64/jli/libjli.so
/usr/java/jdk1.8.0_45/lib/amd64/jli/libjli.so
然后将
/usr/java/jdk1.8.0_45/jre/lib/amd64/jli/
或
/usr/java/jdk1.8.0_45/lib/amd64/jli/
添加到文件:
/etc/ld.so.conf
中,
然后执行
ldconfig
即可