当我尝试安装某些东西时,总是有这个java依赖问题,我已经使用java版本1.8,但我不知道我做错了什么。
在ubuntu中发出此命令
sudo dpkg --configure -a
结果
Setting up oracle-java8-installer (8u121-1~webupd8~0) ...
debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable
dpkg: error processing package oracle-java8-installer (--configure):
subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of oracle-java8-set-default:
oracle-java8-set-default depends on oracle-java8-installer; however:
Package oracle-java8-installer is not configured yet.
dpkg: error processing package oracle-java8-set-default (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
oracle-java8-installer
oracle-java8-set-default
我该如何解决?
答案 0 :(得分:0)
更好地安装Open JDK:
sudo apt-get install openjdk-8-jdk
如果您不使用测试存储库,则可以执行以下操作:
无法找到包openjdk-8-jdk
在这种情况下,您必须包含测试存储库或执行此操作:
sudo apt-get install openjdk-7-jdk
Open JDK - 它是带有开源代码的JDK。它可以更好地安装在Linux中(并自动安装)。并且打开JDK的工作绝对像Oracle JDK。
尝试清除sources.list
(但进行备份,我可能错了)并粘贴到此文件中:
deb http://01.archive.ubuntu.com/ubuntu/ trusty main
deb-src http://01.archive.ubuntu.com/ubuntu/ trusty main
然后做:
sudo apt-get autoclean
sudo apt-get -f install
sudo apt-get install openjdk-7-jdk