问题描述
我最近尝试在ubuntu 12.04上安装java 7,我想我搞砸了一些东西
我跟着the instructions given here。
First you need to remove openjdk for this run the following command from your terminal
sudo apt-get purge openjdk*
Now you can install Java7 by adding the following repository:
sudo add-apt-repository ppa:eugenesan/java
sudo apt-get update
sudo apt-get install oracle-java7-installer
现在我每次安装新程序时都会收到以下错误:
Download done.
sha256sum mismatch jdk-7u3-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
Setting up python-central (0.6.17ubuntu1) ...
Setting up python-eggtrayicon (2.25.3-11) ...
Setting up gmail-notify (1.6.1.1-1ubuntu1) ...
Processing triggers for python-central ...
Errors were encountered while processing:
oracle-java7-installer
Error in function:
然而。该程序似乎安装和工作得很好所以它似乎不是一个阻止我做任何事情的问题
那么我通过去重新安装openjdk:
sudo apt-get安装openjdk *
但我仍然得到同样的错误。
去:
sudo apt-get安装oracle-java7-installer给了我同样的错误。
到底是怎么回事?
如果这是明确与否,请告诉我,并试着更好地解释我的问题
最佳解决思路
从终端运行以下命令:
sudo rm /var/lib/dpkg/info/oracle-java7-installer*
sudo apt-get purge oracle-java7-installer*
sudo rm /etc/apt/sources.list.d/*java*
sudo apt-get update
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java7-installer
Information about what PPAs are, as well as tips on recognizing which of them are unsafe, can be found here.
Glossary
Command, command line: the traditional Unix environment , where you type commands to tell the computer what to do.
Terminal: an application that allows you to access the command line. Open it by hitting its keyboard shortcut, Ctrl Alt T