从webup8team ppa安装oracle-java8-installer时出错


16

有谁知道如何解决这一问题?

首先,我做了:

sudo add-apt-repository ppa:webupd8team/java  

然后我做了:

sudo apt-get update

接着:

$ sudo apt-get install oracle-java8-installer
Reading package lists... Done
Building dependency tree       
Reading state information... Done
oracle-java8-installer is already the newest version.
The following packages were automatically installed and are no longer required:
  antlr3 libdb6.0 libdb6.0-java-jni libice-dev
  libjakarta-taglibs-standard-java libjnr-netdb-java libjstl1.1-java
  liblivetribe-jsr223-java libpthread-stubs0-dev libsm-dev
  libstringtemplate-java libx11-dev libx11-doc libxau-dev libxcb1-dev
  libxdmcp-dev libxt-dev wine-compholio wine-compholio-amd64
  wine-compholio-i386:i386 x11proto-core-dev x11proto-input-dev
  x11proto-kb-dev xorg-sgml-doctools xtrans-dev
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
    The file is already fully retrieved; nothing to do.

Download done.
Removing outdated cached downloads...
sha256sum mismatch jdk-8u25-linux-x64.tar.gz
Oracle JDK 8 is NOT installed.
No apport report written because the error message indicates its a followup error from a previous failure.
                          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
E: Sub-process /usr/bin/dpkg returned an error code (1)

抱歉,如果很难阅读
blaster2429'1

好Java修复它,所以它现在可以正常工作,除了一些错误,但我不在乎,只要它可以工作
blaster2429

您找到解决方案还是问题自行解决了?在前一种情况下,请写下答案并接受。在后一种情况下,您应该删除您的问题(否则它将被关闭)。
David Foerster,2015年

Answers:


18

以下可能有效,它将删除任何部分:

sudo rm /var/cache/oracle-jdk8-installer/jdk-*

然后使用以下命令完成安装:

sudo apt-get install -f
sudo dpkg --configure -a

编辑使更具体。我无法针对这个特定问题进行测试,而且看起来原始的问询者也无法验证结果。
Lectrode 2015年

1
dpkg --configure -a之后的AFAIK apt-get install -f是多余的。
David Foerster,2015年

在很多情况下,您不需要两者。但是,由于我遇到的第一种情况还不够,而解决方案特别需要第二种情况,因此我将两者都包括在内。尤其是对于意外中断的安装或在解决问题(例如,相关性)后需要进行其他配置的安装时,尤其如此。
Lectrode 2015年

2

sudo apt-get upgrade公司代理后面发生此错误。要修复,我编辑/etc/apt/apt.conf并添加了以下几行:

Acquire::http::Proxy "http://[<proxyUserName>:<proxyPass>@]<proxyUrl>:<proxyPort>"; Acquire::https::Proxy "http://[<proxyUserName>:<proxyPass>@]<proxyUrl>:<proxyPort>";

哪里

  • [<proxyUserName>:<proxyPass>@] 是您的可选代理身份验证(如果不进行身份验证,则不包括此身份)

  • <proxyUserName> 是您的代理用户名

  • <proxyPass> 是您的代理密码

  • <proxyUrl> 是您的代理网址

  • <proxyPort> 是您的代理端口

oracle tarball是通过https下载的,因此如果您位于代理后面,则apt需要一个https代理来执行它。

编辑后,保存文件,然后打开一个新终端。sudo apt-get update并根据需要安装。


确认,这是我的解决方案。我在本地运行apt-proxy,禁用它可以解决它。
Coops


1

我有一个同样的问题,我发现这是对我有用的解决方案:

sudo rm /var/lib/dpkg/info/oracle-java8-installer.postinst -f
sudo dpkg --configure oracle-java8-installer

LINK 1 LINK 2


By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.