我有以下Ubuntu:
Ubuntu 12.04.1 LTS
安裝了以下 apt:
apt 0.8.16~exp12ubuntu10.2 for i386 compiled on Jun 15 2012 14:41:15
這是sources.list的內容:
deb http://archive.ubuntu.com/ubuntu precise main universe restricted multiverse
deb-src http://archive.ubuntu.com/ubuntu precise universe main multiverse restricted
deb http://security.ubuntu.com/ubuntu/ precise-security universe main multiverse restricted
deb http://archive.ubuntu.com/ubuntu precise-updates universe main multiverse restricted
deb http://archive.ubuntu.com/ubuntu precise-backports universe main multiverse restricted
# deb http://archive.canonical.com/ubuntu precise partner
# deb-src http://archive.canonical.com/ubuntu precise partner
# deb http://extras.ubuntu.com/ubuntu precise main
# deb-src http://extras.ubuntu.com/ubuntu precise main
我做了:
sudo apt-get clean
sudo apt-get update
我沒有錯誤。
當我做:
sudo apt-cache search ^sun-java
我只有:
sun-javadb-client - Java DB client
sun-javadb-common - Java DB common files
sun-javadb-core - Java DB core
sun-javadb-demo - Java DB demo
sun-javadb-doc - Java DB documentation
sun-javadb-javadoc - Java DB javadoc
最後當我這樣做時:
sudo apt-get install sun-java5-jdk
我有:
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package sun-java5-jdk
但!該包存在於存儲庫中(!!!):
http://archive.ubuntu.com/ubuntu/pool/multiverse/s/sun-java5/
有任何想法嗎?
謝謝你在前面。
答案1
無法安裝的原因sun-java5-jdk
是它不再存在於儲存庫中。它是因安全風險而被刪除。
如果需要使用Java,可以安裝OpenJDK。