无法在Ubuntu Hardy(8.04)上安装sun-java6-bin软件包

前端之家收集整理的这篇文章主要介绍了无法在Ubuntu Hardy(8.04)上安装sun-java6-bin软件包前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我刚从Dapper升级到Hardy,无法为我的生活安装 java
  1. $sudo apt-get install sun-java6-bin sun-java6-jre sun-java6-jdk
  2. [sudo] password for bobpete:
  3. Reading package lists... Done
  4. Building dependency tree
  5. Reading state information... Done
  6. Package sun-java6-bin is not available,but is referred to by another package.
  7. This may mean that the package is missing,has been obsoleted,or
  8. is only available from another source
  9. However the following packages replace it:
  10. sun-java6-jre
  11. E: Package sun-java6-bin has no installation candidate

我检查过/etc/apt/sources.list并运行apt-get更新多次,但没有运气:

  1. #
  2. # deb cdrom:[Ubuntu-Server 6.06 _Dapper Drake_ - Release amd64 (20060531)]/ dapper main restricted
  3.  
  4.  
  5. # deb cdrom:[Ubuntu-Server 6.06 _Dapper Drake_ - Release amd64 (20060531)]/ dapper main restricted
  6.  
  7. deb http://us.archive.ubuntu.com/ubuntu/ hardy main restricted
  8. deb-src http://us.archive.ubuntu.com/ubuntu/ hardy main restricted
  9.  
  10. ## Major bug fix updates produced after the final release of the
  11. ## distribution.
  12. deb http://us.archive.ubuntu.com/ubuntu/ hardy-updates main restricted
  13. deb-src http://us.archive.ubuntu.com/ubuntu/ hardy-updates main restricted
  14.  
  15. ## Uncomment the following two lines to add software from the 'universe'
  16. ## repository.
  17. ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
  18. ## team,and may not be under a free licence. Please satisfy yourself as to
  19. ## your rights to use the software. Also,please note that software in
  20. ## universe WILL NOT receive any review or updates from the Ubuntu security
  21. ## team.
  22. deb http://us.archive.ubuntu.com/ubuntu/ hardy universe
  23. deb-src http://us.archive.ubuntu.com/ubuntu/ hardy universe
  24.  
  25. ## Uncomment the following two lines to add software from the 'backports'
  26. ## repository.
  27. ## N.B. software from this repository may not have been tested as
  28. ## extensively as that contained in the main release,although it includes
  29. ## newer versions of some applications which may provide useful features.
  30. ## Also,please note that software in backports WILL NOT receive any review
  31. ## or updates from the Ubuntu security team.
  32. deb http://us.archive.ubuntu.com/ubuntu/ hardy-backports main restricted universe multiverse
  33. # deb-src http://us.archive.ubuntu.com/ubuntu/ dapper-backports main restricted universe multiverse
  34.  
  35.  
  36. deb http://security.ubuntu.com/ubuntu hardy-security main restricted
  37. deb-src http://security.ubuntu.com/ubuntu hardy-security main restricted
  38. # deb http://security.ubuntu.com/ubuntu dapper-security universe
  39. # deb-src http://security.ubuntu.com/ubuntu dapper-security universe

更新:
@ tux21b你的建议结果如下:

  1. $sudo apt-get install sun-java6-jre sun-java6-jdk
  2. [sudo] password for bobpete:
  3. Reading package lists... Done
  4. Building dependency tree
  5. Reading state information... Done
  6. Package sun-java6-jre is not available,or
  7. is only available from another source
  8. E: Package sun-java6-jre has no installation candidate
包sun-java6-bin不再存在,因为它的内容现在在-jre包中.只需仔细阅读错误信息:
  1. However the following packages replace it:
  2. sun-java6-jre
  3. E: Package sun-java6-bin has no installation candidate

只需试试没有-bin包:

  1. sudo apt-get install sun-java6-jre sun-java6-jdk

编辑:对不起,我刚刚看到了the package is in the “multiverse” section,所以你必须在…之前启用

你必须添加到sources.list的行是:

  1. deb http://us.archive.ubuntu.com/ubuntu/ hardy multiverse

然后,您可以执行apt-get更新并重试安装软件包.

猜你在找的Ubuntu相关文章