Ubuntu下无法安装sun-java6-jdk的解决办法

安装sun-java6-jdk出现以下错误

1
2
3
4
5
6
7
8
9
root@stu-system:/home# sudo apt-get install sun-java6-jdk
Reading package lists... Done
Building dependency tree
Reading state information... Done
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

解决办法如下:

1、添加这个源:

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

方法:

1
sudo gedit /etc/apt/sources.list

打开源列表,在最后一行添加

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

保存退出。

2、更新apt源

1
sudo apt-get update

3、安装sun-java6-jdk

1
sudo apt-get install sun-java6-jdk

当出现:

1
2
3
4
5
6
7
The following NEW packages will be installed:
   gsfonts-x11 java-common odbcinst odbcinst1debian1 sun-java6-bin
   sun-java6-jdk sun-java6-jre unixodbc
0 upgraded, 8 newly installed, 0 to remove and 460 not upgraded.
Need to get 43.6MB of archives.
After this operation, 131MB of additional disk space will be used.
Do you want to continue [Y/n]? y
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值