我有 Ubuntu 12.04 x64,并且正在尝试为 opennms 安装 sun jdk。
sudo apt-get install sun-java6-jdk
当我运行上述命令时我收到以下消息:
root@fido:~# sudo apt-get install sun-java6-jdk
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package sun-java6-jdk is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'sun-java6-jdk' has no installation candidate
我的 /etc/apt/source.list 中有这些行。
deb http://archive.canonical.com/ubuntu natty partner
deb-src http://archive.canonical.com/ubuntu natty partner
答案1
答案2
我必须执行以下命令并且它对我有用。
sudo add-apt-repository "deb http://us.archive.ubuntu.com/ubuntu/ hardy multiverse"
sudo add-apt-repository "deb http://us.archive.ubuntu.com/ubuntu/ hardy-updates multiverse"
sudo apt-get update
sudo apt-get install sun-java6-jdk
按照以下文章,合作伙伴档案不再可用:
https://lists.ubuntu.com/archives/ubuntu-security-announce/2012-January/001554.html