在Ubuntu 10 64位错误安装Java [英] error installing java on ubuntu 10 64bit

查看:170
本文介绍了在Ubuntu 10 64位错误安装Java的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

修改

我添加本说明解释为什么我在这里守了这个问题。我补充说:机器人为关键词,我想知道其他人是否曾试图下载code,以及它如何可以解决此问题。 我担心,如果我问Ubuntu的,他们会建议我使用OpenJDK的,但问题是:没有人使用该SDK构建Android code

原始的

不久以前我下载在Ubuntu 10 64位的Andr​​oid源$ C ​​$ C。 我有问题,但最后我设法使一切工作正常。 现在,我想再做一次在全新安装相同的Ubuntu版本,但我有一个问题。

虽然我也跟着这里的指令 我一直有错误:

  

封装太阳的Java6-jdk的不可用,但被另一个软件包引用。   这可能意味着,缺少包,已被废弃,或者   仅可从另一个源   E:包装太阳的Java6-JDK没有安装候选人

谷歌搜索提供了大量结果,所有给你同样的解决方案:

  sudo的附加的apt-库的deb http://archive.canonical.com/明晰的合作伙伴
sudo易于得到更新
命令和apt-get安装太阳的Java6,JDK
 

我做到了,但没有奏效。

我在VMWare下虚拟机上运行Ubuntu Linux系统。

我也尝试添加其它来源:

  

sudo的附加的apt-库的deb-src的 http://archive.canonical.com/ubuntu清晰的合作伙伴

但它并没有帮助

也许答案就在这里:

<一个href="http://superuser.com/questions/394770/installing-sun-java6-jdk-with-apt-get-on-ubuntu-10-04">Answer在超级用户

但奇怪的是在Android门户网站没有任何提及它

解决方案

现在的问题是,你现在应该手动下载JDK。带我找到了这些步骤,在我的情况下正常工作:

  1. 在下载的Java SE 6 JDK针对Linux x86 自解压二进制文件(如果您使用的32位平台)
  2. 从下载文件夹,使文件的可执行一个搭配chmod + X的jdk-6U&LT;版&GT; -linux-i586.bin,而
  3. 将文件到JVM文件夹 sudo的MV的jdk-6U&LT;版&GT; -linux-i586.bin,而/ usr / lib中/ JVM /
  4. 更改到JVM文件夹,然后运行该自解压二进制 CD / usr / lib中/ JVM
  5. 须藤./jdk-6u<version>-linux-i586.bin
  6. 在一切都将被提取到一个新的JDK1.6的文件夹,你 现在可以删除.bin文件。
  7. 请在替代新的Java二进制文件的符号链接 夹。 须藤LN -s -b /usr/lib/jvm/jdk1.6<version>/jre/bin/java 在/ etc /替代品/ Java的
  8. 附加在你的〜/ .bashrc

      JAVA_HOME = / usr / lib中/ JVM / JDK1.6&LT;版&GT; /
     

         

    PATH = $ PATH:$ JAVA_HOME /斌

  9. 仔细检查版本 Java的版本

请记住,你只能使用JDK V6版本的工作。

EDIT

I added this note to explain why I keep this question here. I added "Android" as keyword and I'd like to know whether someone else has tried to download the code and how it is possible to work around this problem. I fear that if I ask Ubuntu they would suggest me to use OpenJDK but the question is: did someone use that SDK to build Android code?

ORIGINAL

Sometime ago I downloaded the android source code on Ubuntu 10 64bit. I had problems but at the end I managed to get everything working. Now I'm trying to do it again on a fresh install of the same Ubuntu version but I'm having a problem.

Although I followed the instruction here I keep having the error:

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

Googling gives you a lot of results that all give you the same solution:

sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"   
sudo apt-get update
sudo apt-get install sun-java6-jdk

I did it but it didn't work.

I'm running Ubuntu on a VM under VMWare.

I have also tried to add another source:

sudo add-apt-repository "deb-src http://archive.canonical.com/ubuntu lucid partner

but it didn't help

Maybe the answer is here:

Answer in SuperUser

but it is weird that on the Android portal there isn't any mention of it

解决方案

The problem is that you should now download JDK manually. Somewhere I found these steps and it worked fine in my case:

  1. Download Java SE 6 JDK for Linux x86 self-extracting binary (if you work with 32bit platform)
  2. From the download folder, make the file executable chmod a+x jdk-6u<version>-linux-i586.bin
  3. Move the file to the jvm folder sudo mv jdk-6u<version>-linux-i586.bin /usr/lib/jvm/
  4. Change to the jvm folder and run the self-extracting binary cd /usr/lib/jvm
  5. sudo ./jdk-6u<version>-linux-i586.bin
  6. Everything will be extracted to a new jdk1.6 folder and you can delete the .bin file now.
  7. Make a symbolic link to the new java binary in the alternatives folder. sudo ln -s -b /usr/lib/jvm/jdk1.6<version>/jre/bin/java /etc/alternatives/java
  8. Append in your ~/.bashrc

    JAVA_HOME=/usr/lib/jvm/jdk1.6.<version>/
    

    PATH=$PATH:$JAVA_HOME/bin

  9. Double-check the version java -version

Remember that you can work only with JDK v6 version.

这篇关于在Ubuntu 10 64位错误安装Java的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆