如何在 Ubuntu 10.10 (Maverick Meerkat) 上安装 Sun Java JDK?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/3747789/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-14 04:19:01  来源:igfitidea点击:

How to install the Sun Java JDK on Ubuntu 10.10 (Maverick Meerkat)?

javaubuntu

提问by Ivan

I've tried to add the Canonical Partner repository, but I still can't find the sun-java6-jdkpackage. What is the right way to install the Oracle Sun JDK instead of OpenJDK on Ubuntu 10.10(Maverick Meerkat)?

我已尝试添加 Canonical Partner 存储库,但仍然找不到该sun-java6-jdk软件包。在Ubuntu 10.10(Maverick Meerkat)上安装 Oracle Sun JDK 而不是 OpenJDK 的正确方法是什么?

采纳答案by Pascal Thivent

Update (2010/10/01):Yesss, Sun Java Finally Uploaded To The Ubuntu 10.10 Maverick Official Partner Repository.

更新 (2010/10/01):是的,Sun Java 终于上传到 Ubuntu 10.10 Maverick 官方合作伙伴存储库



Update (2010/09/27):Readers might want to check Sun Java6 Packages [updated]. I still expect official packages to be available in the partner repos at releast time though.

更新 (2010/09/27):读者可能想查看Sun Java6 Packages [updated]。不过,我仍然希望在最新的合作伙伴存储库中提供官方软件包。



For an unknown reason, the sun-java6-jdk are not yetavailable in the partner repositories.

由于未知原因,sun-java6-jdk在合作伙伴存储库中尚不可用。

So either downloaded the required packages from http://archive.canonical.com/pool/partner/s/sun-java6/and install them with dpkg -i.

因此,要么从http://archive.canonical.com/pool/partner/s/sun-java6/下载所需的软件包并使用dpkg -i.

Or temporarily replace the maverick partner repository

或者临时更换特立独行的合作伙伴仓库

http://archive.canonical.com/ubuntu maverick partner

by the lucid one (replace maverickby lucidin the above line, let me know if you need more help to do this). Then, install sun-java6. And revert the change.

通过清晰的一个(替换mavericklucid在上面的线,让我知道如果你需要更多的帮助做到这一点)。然后,安装sun-java6。并恢复更改。

回答by Tim Yates

You might have to use the version in the Lucid partner repository. I did this in Lucid (I used the version from Karmic multiverse, before I realized it had been moved to the partner repo), and it worked fine. Not sure where it went in Maverick though.

您可能必须使用 Lucid 合作伙伴存储库中的版本。我在 Lucid 中做到了这一点(我使用了 Karmic multiverse 的版本,然后才意识到它已移至合作伙伴存储库),并且运行良好。不过不确定它在 Maverick 中的位置。

回答by Gaurav Jassal

Currently the Sun Java 6 packages are working fine now for Ubuntu 10.10and 10.04users. It works fine for me.

目前,Sun Java 6 软件包现在对Ubuntu 10.1010.04用户运行良好。这对我来说可以。

sudo apt-get install python-software-properties

sudo add-apt-repository ppa:sun-java-community-team/sun-java6

sudo apt-get update

sudo apt-get install sun-java6-jdk

回答by Yoshi

sudo add-apt-repository ppa:sun-java-community-team/sun-java6

sudo apt-get update

sudo apt-get install sun-java6-jre sun-java6-bin sun-java6-jdk

回答by earcam

All you need to do is uncomment the two lines in /etc/apt/sources.list that refer to "partner"

您需要做的就是取消注释 /etc/apt/sources.list 中提到“合作伙伴”的两行

sudo nano /etc/apt/sources.list
# uncomment the two lines referring to "partner"
sudo apt-get update 
sudo apt-get install sun-java6-jre sun-java6-bin sun-java6-jdk

(I can't find the command add-apt-repository on Ubuntu 10.10, 64 amd ... even searching with apt-cache yields nothing)

(我在 Ubuntu 10.10、64 amd 上找不到命令 add-apt-repository ......即使使用 apt-cache 搜索也不会产生任何结果)

回答by Pete Long

For Ubuntu 10.10 Desktop simply do this: Ubuntu - Installing Java.

对于 Ubuntu 10.10 桌面,只需执行以下操作:Ubuntu - 安装 Java

回答by Guardius

I am assuming that you need the JDK itself. If so you can accomplish this with:

我假设您需要 JDK 本身。如果是这样,您可以通过以下方式完成此操作:

sudo add-apt-repository ppa:sun-java-community-team/sun-java6

sudo apt-get update

sudo apt-get install sun-java6-jdk

You don't really need to go around editing sources or anything along those lines.

你真的不需要绕过编辑源或任何沿着这些方向的东西。

回答by Josue Efrain Didier Balbuena

If add-apt-repository it's not working try this:

如果 add-apt-repository 它不起作用试试这个:

sudo apt-get install python-software-properties

That package is required in order to execute that command, in my server it wasn't installed by default (Ubuntu server x64)

该软件包是执行该命令所必需的,在我的服务器中,默认情况下未安装它(Ubuntu 服务器 x64)