简体   繁体   中英

No Java for Ubuntu?

I just installed Ubuntu 10.4 in VMWare Workstation.

When I try to install java, I couldn't find the package:

xxx@ubuntu:~$sudo apt-get install sun-java6-jre
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package sun-java6-jre is not available, but is referred to by another package.
This may mean the package is missing, has been obsoleted, or
is only available from another source
E: Package sun-java6-jre has no installation candidate

I'm confused.

Ubuntu is supporting OpenJDK-6 on Lucid Lynx (10.04). See the Ubuntu packages for OpenJDK for details. See also:

As someone else mentioned, the Ubuntu/Debian multiverse repositories have additional Java packages; you can enable them by following these instructions:

Thanks. I solved the problem by uncommenting the following lines in /etc/apt/sources.list:

deb http://archive.canonical.com/ubuntu lucid partner
deb-src http://archive.canonical.com/ubuntu lucid partner

It is in the multiverse repository component, I think.

I can't remember if it is enabled by dafault.

here is info to enable the multiverse for an older version, but it should be similar for 10.04.

You need to enable your universe and multiverse repositories by editing /etc/apt/sources.list

It's not in the default sources list.

Do a search:

apt-cache search java

See the correct JRE name. This should work.

您可以使用Ubuntu软件中心,下载Java和许多其他工具/软件

您始终可以从Sun / Java网站下载并安装Java。

你有没有更新你的APT?

sudo apt-get update

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM