我刚刚更新到新的 Ubuntu 16.04。这是此操作系统的全新安装。尝试安装 Openjdk 7,但出现此错误。
软件包‘openjdk-7-jre’没有安装候选项
我如何解决它?
答案1
如果你确实要安装 JDK7,请在文件中添加这些内容/etc/apt/sources.list
,
deb http://archive.ubuntu.com/ubuntu/ trusty main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ trusty-security main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ trusty-updates main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ trusty-proposed main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse
通过发出以下命令,
sudoedit /etc/apt/sources.list
然后运行,
sudo apt-get update
运行apt-cache search openjdk-7-jre
验证。