开发者

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 be开发者_运维技巧en 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:

  • https://help.ubuntu.com/community/Java
  • https://help.ubuntu.com/community/JavaInstallation

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

  • https://help.ubuntu.com/community/Repositories/Ubuntu


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.


You could always download and install Java from the Sun / Java website.


Did you update your APT?

sudo apt-get update


you can use Ubuntu Software Center, to download java and many other Tools/Softwares

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜