我今天花了很多时间尝试在我的crunchbang发行版上安装java 7。我最初安装了OpenJDK但遇到了mumble服务器安装问题。现在(某种程度上)排序,但现在我没有java 7或OpenJDK。我的java版本是:
matt@crunchbang:~$ java -version
java version "1.5.0"
gij (GNU libgcj) version 4.7.2
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
尝试安装java 7时
(sudo apt-get install Oracle-java7-installer
)我最终得到的错误如下:
sha256sum mismatch jdk-7u7-linux-x64.tar.gz
Oracle JDK 7 is NOT installed.
dpkg: error processing oracle-java7-installer (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
oracle-java7-installer
E: Sub-process /usr/bin/dpkg returned an error code (1)
我尝试过的事情:
完整的java安装日志:
matt@crunchbang:~$ sudo apt-get install oracle-java7-installer
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
fonts-opensymbol fonts-sil-gentium fonts-sil-gentium-basic gcj-4.7-base gcj-4.7-jre gcj-4.7-jre-headless gcj-4.7-jre-lib gcj-jre
gcj-jre-headless libapache-pom-java libcmis-0.2-0 libcommons-beanutils-java libcommons-collections3-java libcommons-compress-java
libcommons-digester-java libcommons-logging-java libcommons-parent-java libdb-java libdb-je-java libdb5.1-java libdb5.1-java-jni
libexttextcat-data libexttextcat0 libgcj-common libgcj13 libgcj13-awt libgraphite2-2.0.0 libhsqldb-java libhyphen0 libicu4j-java
libjaxp1.3-java libjline-java libjtidy-java liblucene2-java libmythes-1.2-0 libneon27-gnutls libnss3-1d libregexp-java libservlet2.5-java
libvisio-0.0-0 libxalan2-java libxerces2-java libxml-commons-external-java libxml-commons-resolver1.1-java libxz-java
ttf-sil-gentium-basic uno-libs3 ure xfonts-mathml
Use 'apt-get autoremove' to remove them.
Suggested packages:
binfmt-support visualvm ttf-baekmuk ttf-unfonts ttf-unfonts-core ttf-kochi-gothic ttf-sazanami-gothic ttf-kochi-mincho
ttf-sazanami-mincho ttf-arphic-uming
The following NEW packages will be installed:
oracle-java7-installer
0 upgraded, 1 newly installed, 0 to remove and 1 not upgraded.
Need to get 0 B/16.2 kB of archives.
After this operation, 88.1 kB of additional disk space will be used.
Preconfiguring packages ...
Selecting previously unselected package oracle-java7-installer.
(Reading database ... 94766 files and directories currently installed.)
Unpacking oracle-java7-installer (from .../oracle-java7-installer_7u7-0~crunchbang~4_all.deb) ...
Processing triggers for desktop-file-utils ...
Setting up oracle-java7-installer (7u7-0~crunchbang~4) ...
Removing outdated cached downloads...
Downloading Oracle Java 7...
--2014-05-23 15:35:08-- http://download.oracle.com/otn-pub/java/jdk/7u7-b10/jdk-7u7-linux-x64.tar.gz
Resolving download.oracle.com (download.oracle.com)... 23.73.181.33, 23.73.181.26
Connecting to download.oracle.com (download.oracle.com)|23.73.181.33|:80... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: https://edelivery.oracle.com/otn-pub/java/jdk/7u7-b10/jdk-7u7-linux-x64.tar.gz [following]
--2014-05-23 15:35:08-- https://edelivery.oracle.com/otn-pub/java/jdk/7u7-b10/jdk-7u7-linux-x64.tar.gz
Resolving edelivery.oracle.com (edelivery.oracle.com)... 23.78.166.140
Connecting to edelivery.oracle.com (edelivery.oracle.com)|23.78.166.140|:443... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: http://download.oracle.com/errors/download-fail-1505220.html [following]
--2014-05-23 15:35:09-- http://download.oracle.com/errors/download-fail-1505220.html
Connecting to download.oracle.com (download.oracle.com)|23.73.181.33|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 5307 (5.2K) [text/html]
Saving to: `jdk-7u7-linux-x64.tar.gz'
0K 100% 3.48M=0.001s
2014-05-23 15:35:09 (3.48 MB/s) - `jdk-7u7-linux-x64.tar.gz' saved [5307/5307]
Download done.
sha256sum mismatch jdk-7u7-linux-x64.tar.gz
Oracle JDK 7 is NOT installed.
dpkg: error processing oracle-java7-installer (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
oracle-java7-installer
E: Sub-process /usr/bin/dpkg returned an error code (1)
答案 0 :(得分:1)
我在我的Chromebook上运行crunchbang wheezy并遇到了完全相同的问题。
这为我解决了这个问题:
我有一个类似的问题,我发现对我有用的东西 进入/ var / lib / dpkg / info并删除具有该名称的所有内容 您可能还需要进入/ var / cache / apt / archives并执行相同的操作 事情。我对linux很新,所以如果这打破了什么我很抱歉。 我还没有遇到任何导致这种问题的问题。
警告:
您正在删除安装前和安装后脚本。这很容易 意味着包装不能正确安装,而且不会 如果您选择卸载它,请正确删除。这是错误的事情 要做。
但是,我找不到任何其他解决方案。当然,我有点急于解决这个问题,所以我并没有花太多时间寻找替代解决方案。