你好,我是 ubuntu 新手。我尝试使用“sudo apt-get install apache2”命令安装 Apache2。我已按规则设置了 Java 路径,但仍然显示以下错误:
sha256sum mismatch jdk-7u3-linux-i586.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
dpkg: dependency problems prevent configuration of libcommons-dbcp-java:
libcommons-dbcp-java depends on default-jre-headless | java2-runtime-headless; however:
Package default-jre-headless is not installed.
Package oracle-java7-installer which provides default-jre-headless is not configured yet.
Package java2-runtime-headless is not installed.
Package oracle-java7-installer which provides java2-runtime-headless is not configured yet.
dpkg: error processing libcommons-dbcp-java (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of libtomcat6-java:
libtomcat6-java depends on libcommons-dbcp-java; however:
Package libcommons-dbcp-java is not configured yet.
dpkg: error processing libtomcat6-java (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of tomcat6-common:
tomcat6-common depends on libtomcat6-java (>= 6.0.32-5ubuntu1.2); however:
Package libtomcat6-java is not conNo apport report written because the error message indicates its a followup error from a previous failure.
No apport report written because the error message indicates its a followup error from a previous failure.
No apport report written because MaxReports is reached already
No apport report written because MaxReports is reached already
No apport report written because MaxReports is reached already
No apport report written because MaxReports is reached already
No apport report written because MaxReports is reached already
No apport report written because MaxReports is reached already
figured yet.
dpkg: error processing tomcat6-common (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of tomcat6:
tomcat6 depends on tomcat6-common (>= 6.0.32-5ubuntu1.2); however:
Package tomcat6-common is not configured yet.
dpkg: error processing tomcat6 (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of tomcat6-admin:
tomcat6-admin depends on tomcat6-common (>= 6.0.32-5ubuntu1.2); however:
Package tomcat6-common is not configured yet.
dpkg: error processing tomcat6-admin (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of tomcat6-docs:
tomcat6-docs depends on tomcat6-common (>= 6.0.32-5ubuntu1.2); however:
Package tomcat6-common is not configured yet.
dpkg: error processing tomcat6-docs (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of tomcat6-examples:
tomcat6-examples depends on tomcat6-common (>= 6.0.32-5ubuntu1.2); however:
Package tomcat6-common is not configured yet.
dpkg: error processing tomcat6-examples (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of tomcat6-user:
tomcat6-user depends on tomcat6-common (>= 6.0.32-5ubuntu1.2); however:
Package tomcat6-common is not configured yet.
dpkg: error processing tomcat6-user (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
oracle-java7-installer
libcommons-dbcp-java
libtomcat6-java
tomcat6-common
tomcat6
tomcat6-admin
tomcat6-docs
tomcat6-examples
tomcat6-user
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@sheetal:/home/prakash/Downloads#
答案1
你确定你安装的是 Oracle Java 吗?如果没有,在 Ubuntu 中安装 Oracle Java 需要执行类似以下链接的操作: http://www.webupd8.org/2012/01/install-oracle-java-jdk-7-in-ubuntu-via.html