error while loading shared libraries: libjli.so 问题解决

问题描述: 
执行jar命令,javac命令执行报错 
javac: error while loading shared libraries: libjli.so: cannot open shared object file: No such file or directory

jar: error while loading shared libraries: libjli.so: cannot open shared object file: No such file or directory

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

解决方案: 
rm -rf /usr/bin/javac 
rm -rf /usr/bin/jar

rm -rf /usr/bin/java
然后建立软链 
ln -s /usr/local/jdk1.6.0_13/bin/javac /usr/bin/javac 
ln -s /usr/local/jdk1.6.0_13/bin/jar /usr/bin/jar

ln -s /usr/local/jdk1.6.0_13/bin/javac /usr/bin/java
分析原因: 
原来安装的时候,安装了openjdk,卸载的时候可能这些执行文件没卸载掉. 
导致不能使用. 
所以将/usr/bin/下的老执行文件删除掉就能执行了.

查找libjli.so文件 
find / -name libjli.so

ldd /usr/bin/java

mv /usr/local/jdk1.6.0_13/jre/lib/i386/jli/libjli.so /lib

时间: 2024-10-14 10:53:42

error while loading shared libraries: libjli.so 问题解决的相关文章

java 罕见的依赖报错 jstat: error while loading shared libraries: libjli.so: cannot open shared object file: No such file or directory

java 都用了N长时间了,突然,意外地发现有一个依赖的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

gm: error while loading shared libraries: libpng15.so.15: cannot open shared object file: No such file or directory

org.im4java.core.CommandException: org.im4java.core.CommandException: /usr/local/bin/gm: error while loading shared libraries: libpng15.so.15: cannot open shared object file: No such file or directory 原因:GraphicsMagick-LATEST17.tar.gz 安装 错误,无法访问libpn

sqlplus: error while loading shared libraries: /u01/app/lib/libclntsh.so.11.1

成功安装了Oracle 11g后,使用sqlplus登录数据库时遇到下面错误: [[email protected] ~]$ sqlplus / as sysdba   sqlplus: error while loading shared libraries: /u01/app/lib/libclntsh.so.11.1: cannot restore segment prot after reloc: Permission denied 这个错误是由于SELINUX引起的,因为你在安装过程中

sysbench: error while loading shared libraries: libmysqlclient.so.18: cannot open shared object file

安装编译完后sysbench后,报错. 报错信息: [[email protected] dongbo]# sysbench -v sysbench: error while loading shared libraries: libmysqlclient.so.18: cannot open shared object file: No such file or directory 解决方法: 1. [[email protected] dongbo]# ls -l /usr/local/my

Nginx启动错误:error while loading shared libraries: libpcre.so.0

今天测试的时候,启动一个其他机器预编译好的nginx到目标测试机器(OEL 7.4)启动的时候,报了下列错误: /usr/local/nginx/sbin/nginx: error while loading shared libraries: libpcre.so.0: cannot open shared object file: No such file or directory 经查,OEL 7.4版本下/lib64下没有libpcre.so.0这个共享库,故创建一个到libpcre.s

解决ffmpeg执行报错“ffmpeg: error while loading shared libraries: libavdevice.so.58: cannot open shared object file: No such file or directory”的问题

问题现象: 执行ffmpeg命令后报错: ffmpeg: error while loading shared libraries: libavdevice.so.58: cannot open shared object file: No such file or directory 出问题的环境信息为: Fedora release 31 (Thirty One) ffmpeg-4.2.1 官方源码编译 看下需要哪些依赖: ldd ffmpeg 可以看到缺失的依赖 我们找下这些文件在哪里 f

Nginx 启动出错 error while loading shared libraries: libpcre.so.1

在 centos 6.5  64位上编译安装nginx1.63语法检查出错[root @localhost conf]# /usr/local/nginx/sbin/nginx -t /usr/local/nginx/sbin/nginx: error while loading shared libraries: libpcre.so.1: cannot open shared object file: No such file or directory 从错误看出是缺少lib文件导致,进一步

sqlplus: error while loading shared libraries解决方法

dbca建库后sqlplus提示如下 $ sqlplus / as sysdba sqlplus: error while loading shared libraries: /u01/app/oracle/product/11.2.0/dbhome_1/lib/libclntsh.so.11.1: cannot restore segment prot after reloc: Permission denied 解决方法 将selinux功能关掉 root用户 将/etc/selinux/c

error while loading shared libraries: libluajit-5.1.so.2: cannot open shared 解决办法

一般我们在Linux下执行某些外部程序的时候可能会提示找不到共享库的错误, 比如: tmux: error while loading shared libraries: libevent-1.4.so.2: cannot open shared object file: No such file or directory 原因一般有两个, 一个是操作系统里确实没有包含该共享库(lib*.so.*文件)或者共享库版本不对, 遇到这种情况那就去网上下载并安装上即可. 另外一个原因就是已经安装了该共