簡體   English   中英

無法在Ubuntu Hardy上安裝sun-java6-bin包(8.04)

[英]Can't install sun-java6-bin package on Ubuntu Hardy (8.04)

我剛剛從Dapper升級到Hardy,無法在我的生活中安裝java:

$ sudo apt-get install sun-java6-bin sun-java6-jre sun-java6-jdk
[sudo] password for bobpete:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package sun-java6-bin 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
However the following packages replace it:
  sun-java6-jre
E: Package sun-java6-bin has no installation candidate

我已經多次檢查/etc/apt/sources.list並運行apt-get update ,但沒有運氣:

# 
# deb cdrom:[Ubuntu-Server 6.06 _Dapper Drake_ - Release amd64 (20060531)]/ dapper main restricted


# deb cdrom:[Ubuntu-Server 6.06 _Dapper Drake_ - Release amd64 (20060531)]/ dapper main restricted

deb http://us.archive.ubuntu.com/ubuntu/ hardy main restricted
deb-src http://us.archive.ubuntu.com/ubuntu/ hardy main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb http://us.archive.ubuntu.com/ubuntu/ hardy-updates main restricted
deb-src http://us.archive.ubuntu.com/ubuntu/ hardy-updates main restricted

## Uncomment the following two lines to add software from the 'universe'
## repository.
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## universe WILL NOT receive any review or updates from the Ubuntu security
## team.
deb http://us.archive.ubuntu.com/ubuntu/ hardy universe
deb-src http://us.archive.ubuntu.com/ubuntu/ hardy universe

## Uncomment the following two lines to add software from the 'backports'
## repository.
## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://us.archive.ubuntu.com/ubuntu/ hardy-backports main restricted universe multiverse
# deb-src http://us.archive.ubuntu.com/ubuntu/ dapper-backports main restricted universe multiverse


deb http://security.ubuntu.com/ubuntu hardy-security main restricted
deb-src http://security.ubuntu.com/ubuntu hardy-security main restricted
# deb http://security.ubuntu.com/ubuntu dapper-security universe
# deb-src http://security.ubuntu.com/ubuntu dapper-security universe

更新:@tux21b您的建議結果如下:

$ sudo apt-get install sun-java6-jre sun-java6-jdk
[sudo] password for bobpete:
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 that the package is missing, has been obsoleted, or
is only available from another source
E: Package sun-java6-jre has no installation candidate

sun-java6-bin不再存在,因為它的內容現在位於-jre包中。 只需仔細閱讀錯誤消息:

However the following packages replace it:
  sun-java6-jre
E: Package sun-java6-bin has no installation candidate

只需在沒有-bin包的情況下嘗試:

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

編輯:對不起,我剛看到該軟件包在“multiverse”部分 ,所以你必須在之前啟用它...

您必須添加到sources.list的行是:

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

然后,您可以執行apt-get update並重試安裝軟件包。

作為一個完全的菜鳥我的自我。 讓我非常容易,因為我也在努力解決這個問題。

為了能夠使用“apt-get”命令安裝sun-java,您需要在名為“sources.list”的文件中添加一行。 這一行可以在/etc/apt/sources.list中找到。 您可以通過編寫:nano ../etc/apt/sources.list來編輯它

比該文件的最后(底部),你復制/粘貼行:deb http://us.archive.ubuntu.com/ubuntu/ hardy multiverse

現在按Ctrl + X退出,然后按“y”保存。

現在輸入命令:apt-get update完成后,您可以成功運行命令:sudo apt-get install sun-java6-jdk

只試試..

sudo apt-get install sun-java6-jdk

那應該安裝jre和bin的東西作為依賴。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM