apt:找不到 libjava.so

apt:找不到 libjava.so

我有 Ubuntu 16.04。运行后apt显示

Error: could not find libjava.so
Error: could not find Java 2 Runtime Environment.

除此之外,Java 似乎运行良好。apt-get也运行良好。

$ locate libjava.so
/opt/java/jdk1.6.0_45/jre/lib/amd64/libjava.so
/opt/java/jdk1.7.0_79/jre/lib/amd64/libjava.so
/u01/app/oracle/product/12.1.0/db_1/jdk/jre/lib/amd64/libjava.so
/usr/java/jdk1.7.0_79/jre/lib/amd64/libjava.so
/usr/lib/jvm/java-8-oracle/jre/lib/amd64/libjava.so

我该如何进一步诊断问题?

编辑: type apt

apt is /usr/local/bin/apt
apt is /usr/bin/apt

第二个,,/usr/bin/apt工作正常。

$ dpkg -S /usr/bin/apt
apt: /usr/bin/apt
$ dpkg -S /usr/local/bin/apt
dpkg-query: no path found matching pattern /usr/local/bin/apt

所以我想我可以直接删除/usr/local/bin/apt

相关内容