软件安装 – 如何在Ubuntu 16.04上安装OpenJDK?

参见英文答案 > How do I install openjdk 7 on Ubuntu 16.04 or higher?                                    8个
由于我升级到最新版本的Ubuntu,我无法安装编译Android自定义ROM所需的Java OpenJDK包.当我运行sudo apt-get install openjdk-7-jdk时,会出现以下错误:

Reading package lists... Done Building dependency tree        Reading
state information... Done Some packages could not be installed. This
may mean that you have requested an impossible situation or if you are
using the unstable distribution that some required packages have not
yet been created or been moved out of Incoming. The following
information may help to resolve the situation:

The following packages have unmet dependencies:  openjdk-7-jdk :
 Depends: openjdk-7-jre (= 7u51-2.4.6-1ubuntu4) E: Unable to correct
 problems, you have held broken packages.

我该如何解决这个问题?

解决方法:

也有同样的问题..但我用这些命令解决了它:

sudo add-apt-repository ppa:openjdk-r/ppa  
sudo apt-get update   
sudo apt-get install openjdk-7-jre  
上一篇:Jenkins Server的安装部署方式


下一篇:django server之间通过remote user 相互调用