ubuntu9.10 总不能安装sun-java5-jdk的解决办法

因为9.10版本已经把源去掉了,所以必须加上9.04的源,具体步骤如下:

 

1 打开 vim  /etc/apt/sources.list

 

2 在末尾加上9.04的源(这里有的网站说先去掉9.10的源,这里不建议这样做,可能导致系统崩溃,要么去掉,最后也需要还原):

# 以下来自http://wiki.ubuntu.org.cn/index.php?title=Template:9.10source&variant=zh-cn
# 台湾的官方源速度也相当不错,有时甚至快于内地的:
deb http://tw.archive.ubuntu.com/ubuntu karmic main restricted universe multiverse
deb http://tw.archive.ubuntu.com/ubuntu karmic-security main restricted universe multiverse
deb http://tw.archive.ubuntu.com/ubuntu karmic-updates main restricted universe multiverse
deb http://tw.archive.ubuntu.com/ubuntu karmic-backports main restricted universe multiverse
deb http://tw.archive.ubuntu.com/ubuntu karmic-proposed main restricted universe multiverse
deb-src http://tw.archive.ubuntu.com/ubuntu karmic main restricted universe multiverse
deb-src http://tw.archive.ubuntu.com/ubuntu karmic-security main restricted universe multiverse
deb-src http://tw.archive.ubuntu.com/ubuntu karmic-updates main restricted universe multiverse
deb-src http://tw.archive.ubuntu.com/ubuntu karmic-backports main restricted universe multiverse
deb-src http://tw.archive.ubuntu.com/ubuntu karmic-proposed main restricted universe multiverse

# 中国台湾 台湾大学更新服务器(推荐网通用户使用,电信PING平均响应速度41MS。强烈推荐此源,比较完整,较少出现同步问题):
deb http://ubuntu.csie.ntu.edu.tw/ubuntu/ karmic main restricted universe multiverse
deb-src http://ubuntu.csie.ntu.edu.tw/ubuntu/ karmic main restricted universe multiverse
deb http://ubuntu.csie.ntu.edu.tw/ubuntu/ karmic-updates main restricted universe multiverse
deb-src http://ubuntu.csie.ntu.edu.tw/ubuntu/ karmic-updates main restricted universe multiverse
deb http://ubuntu.csie.ntu.edu.tw/ubuntu/ karmic-backports main restricted universe multiverse
deb-src http://ubuntu.csie.ntu.edu.tw/ubuntu/ karmic-backports main restricted universe multiverse
deb http://ubuntu.csie.ntu.edu.tw/ubuntu/ karmic-security main restricted universe multiverse
deb-src http://ubuntu.csie.ntu.edu.tw/ubuntu/ karmic-security main restricted universe multiverse
deb http://ubuntu.csie.ntu.edu.tw/ubuntu/ karmic-proposed main multiverse restricted universe
deb-src http://ubuntu.csie.ntu.edu.tw/ubuntu/ karmic-proposed main restricted universe multiverse

# 网易163更新服务器:
deb http://mirrors.163.com/ubuntu/ karmic main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ karmic-security main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ karmic-updates main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ karmic-proposed main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ karmic-backports main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ karmic main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ karmic-security main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ karmic-updates main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ karmic-proposed main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ karmic-backports main restricted universe multiverse

# sohu 更新服务器:
deb http://mirrors.sohu.com/ubuntu/ karmic main restricted universe multiverse
deb http://mirrors.sohu.com/ubuntu/ karmic-security main restricted universe multiverse
deb http://mirrors.sohu.com/ubuntu/ karmic-updates main restricted universe multiverse
deb http://mirrors.sohu.com/ubuntu/ karmic-proposed main restricted universe multiverse
deb http://mirrors.sohu.com/ubuntu/ karmic-backports main restricted universe multiverse
deb-src http://mirrors.sohu.com/ubuntu/ karmic main restricted universe multiverse
deb-src http://mirrors.sohu.com/ubuntu/ karmic-security main restricted universe multiverse
deb-src http://mirrors.sohu.com/ubuntu/ karmic-updates main restricted universe multiverse
deb-src http://mirrors.sohu.com/ubuntu/ karmic-proposed main restricted universe multiverse
deb-src http://mirrors.sohu.com/ubuntu/ karmic-backports main restricted universe multiverse

# 骨头兄亲自搭建并维护这个Ubuntu源(该源位于浙江杭州百兆共享宽带的电信机房):
deb http://ubuntu.srt.cn/ubuntu/ karmic main restricted universe multiverse
deb http://ubuntu.srt.cn/ubuntu/ karmic-security main restricted universe multiverse
deb http://ubuntu.srt.cn/ubuntu/ karmic-updates main restricted universe multiverse
deb http://ubuntu.srt.cn/ubuntu/ karmic-proposed main restricted universe multiverse
deb http://ubuntu.srt.cn/ubuntu/ karmic-backports main restricted universe multiverse
deb-src http://ubuntu.srt.cn/ubuntu/ karmic main restricted universe multiverse
deb-src http://ubuntu.srt.cn/ubuntu/ karmic-security main restricted universe multiverse
deb-src http://ubuntu.srt.cn/ubuntu/ karmic-updates main restricted universe multiverse
deb-src http://ubuntu.srt.cn/ubuntu/ karmic-proposed main restricted universe multiverse
deb-src http://ubuntu.srt.cn/ubuntu/ karmic-backports main restricted universe multiverse
deb http://mirror.lupaworld.com/ubuntu/ubuntu-cn karmic main restricted universe multiverse

# Archive.ubuntu.com更新服务器(欧洲,此为官方源,电信网通用户使用):
deb http://archive.ubuntu.com/ubuntu/ karmic main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ karmic-security main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ karmic-updates main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ karmic-proposed main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ karmic-backports main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ karmic main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ karmic-security main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ karmic-updates main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ karmic-proposed main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ karmic-backports main restricted universe multiverse

# Mirrors.shlug.org更新服务器(电信服务器,Ubuntu China Official Mirror, maintained by Shanghai Linux User Group):
deb http://cn.archive.ubuntu.com/ubuntu karmic main restricted universe multiverse
deb http://cn.archive.ubuntu.com/ubuntu karmic-security main restricted universe multiverse
deb http://cn.archive.ubuntu.com/ubuntu karmic-updates main restricted universe multiverse
deb http://cn.archive.ubuntu.com/ubuntu karmic-backports main restricted universe multiverse
deb http://cn.archive.ubuntu.com/ubuntu karmic-proposed main restricted universe multiverse
deb-src http://cn.archive.ubuntu.com/ubuntu karmic main restricted universe multiverse
deb-src http://cn.archive.ubuntu.com/ubuntu karmic-security main restricted universe multiverse
deb-src http://cn.archive.ubuntu.com/ubuntu karmic-updates main restricted universe multiverse
deb-src http://cn.archive.ubuntu.com/ubuntu karmic-backports main restricted universe multiverse
deb-src http://cn.archive.ubuntu.com/ubuntu karmic-proposed main restricted universe multiverse

# Mirror.lupaworld.com更新服务器(浙江省杭州市双线服务器):
deb http://mirror.lupaworld.com/ubuntu karmic main restricted universe multiverse
deb http://mirror.lupaworld.com/ubuntu karmic-security main restricted universe multiverse
deb http://mirror.lupaworld.com/ubuntu karmic-updates main restricted universe multiverse
deb http://mirror.lupaworld.com/ubuntu karmic-backports main restricted universe multiverse
deb http://mirror.lupaworld.com/ubuntu karmic-proposed main restricted universe multiverse
deb-src http://mirror.lupaworld.com/ubuntu karmic main restricted universe multiverse
deb-src http://mirror.lupaworld.com/ubuntu karmic-security main restricted universe multiverse
deb-src http://mirror.lupaworld.com/ubuntu karmic-updates main restricted universe multiverse
deb-src http://mirror.lupaworld.com/ubuntu karmic-backports main restricted universe multiverse
deb-src http://mirror.lupaworld.com/ubuntu karmic-proposed main restricted universe multiverse

# 厦门大学更新服务器(教育网服务器):
deb ftp://ubuntu.realss.cn/ubuntu/ karmic main restricted universe multiverse
deb ftp://ubuntu.realss.cn/ubuntu/ karmic-backports restricted universe multiverse
deb ftp://ubuntu.realss.cn/ubuntu/ karmic-proposed main restricted universe multiverse
deb ftp://ubuntu.realss.cn/ubuntu/ karmic-security main restricted universe multiverse
deb ftp://ubuntu.realss.cn/ubuntu/ karmic-updates main restricted universe multiverse
deb-src ftp://ubuntu.realss.cn/ubuntu/ karmic main restricted universe multiverse
deb-src ftp://ubuntu.realss.cn/ubuntu/ karmic-backports main restricted universe multiverse
deb-src ftp://ubuntu.realss.cn/ubuntu/ karmic-proposed main restricted universe multiverse
deb-src ftp://ubuntu.realss.cn/ubuntu/ karmic-security main restricted universe multiverse
deb-src ftp://ubuntu.realss.cn/ubuntu/ karmic-updates main restricted universe multiverse

# 成都市 电子科技大学更新服务器(教育网,推荐校园网和网通用户使用):
deb http://ubuntu.uestc.edu.cn/ubuntu/ karmic main multiverse restricted universe
deb http://ubuntu.uestc.edu.cn/ubuntu/ karmic-backports main multiverse restricted universe
deb http://ubuntu.uestc.edu.cn/ubuntu/ karmic-proposed main multiverse restricted universe
deb http://ubuntu.uestc.edu.cn/ubuntu/ karmic-security main multiverse restricted universe
deb http://ubuntu.uestc.edu.cn/ubuntu/ karmic-updates main multiverse restricted universe
deb-src http://ubuntu.uestc.edu.cn/ubuntu/ karmic main multiverse restricted universe
deb-src http://ubuntu.uestc.edu.cn/ubuntu/ karmic-backports main multiverse restricted universe
deb-src http://ubuntu.uestc.edu.cn/ubuntu/ karmic-proposed main multiverse restricted universe
deb-src http://ubuntu.uestc.edu.cn/ubuntu/ karmic-security main multiverse restricted universe
deb-src http://ubuntu.uestc.edu.cn/ubuntu/ karmic-updates main multiverse restricted universe

# == 如果无法解析uestc.edu.cn域名,请使用以下地址 ==

deb http://ubuntu.dormforce.net/ubuntu/ karmic main multiverse restricted universe
deb http://ubuntu.dormforce.net/ubuntu/ karmic-backports main multiverse restricted universe
deb http://ubuntu.dormforce.net/ubuntu/ karmic-proposed main multiverse restricted universe
deb http://ubuntu.dormforce.net/ubuntu/ karmic-security main multiverse restricted universe
deb http://ubuntu.dormforce.net/ubuntu/ karmic-updates main multiverse restricted universe
deb-src http://ubuntu.dormforce.net/ubuntu/ karmic main multiverse restricted universe
deb-src http://ubuntu.dormforce.net/ubuntu/ karmic-backports main multiverse restricted universe
deb-src http://ubuntu.dormforce.net/ubuntu/ karmic-proposed main multiverse restricted universe
deb-src http://ubuntu.dormforce.net/ubuntu/ karmic-security main multiverse restricted universe
deb-src http://ubuntu.dormforce.net/ubuntu/ karmic-updates main multiverse restricted universe

# 上海市上海交通大学更新服务器:
deb http://ftp.sjtu.edu.cn/ubuntu/ karmic main multiverse restricted universe
deb http://ftp.sjtu.edu.cn/ubuntu/ karmic-backports main multiverse restricted universe
deb http://ftp.sjtu.edu.cn/ubuntu/ karmic-proposed main multiverse restricted universe
deb http://ftp.sjtu.edu.cn/ubuntu/ karmic-security main multiverse restricted universe
deb http://ftp.sjtu.edu.cn/ubuntu/ karmic-updates main multiverse restricted universe
deb-src http://ftp.sjtu.edu.cn/ubuntu/ karmic main multiverse restricted universe
deb-src http://ftp.sjtu.edu.cn/ubuntu/ karmic-backports main multiverse restricted universe
deb-src http://ftp.sjtu.edu.cn/ubuntu/ karmic-proposed main multiverse restricted universe
deb-src http://ftp.sjtu.edu.cn/ubuntu/ karmic-security main multiverse restricted universe
deb-src http://ftp.sjtu.edu.cn/ubuntu/ karmic-updates main multiverse restricted universe

# 中国科学技术大学更新服务器:
deb http://debian.ustc.edu.cn/ubuntu/ karmic main multiverse restricted universe
deb http://debian.ustc.edu.cn/ubuntu/ karmic-backports main multiverse restricted universe
deb http://debian.ustc.edu.cn/ubuntu/ karmic-proposed main multiverse restricted universe
deb http://debian.ustc.edu.cn/ubuntu/ karmic-security main multiverse restricted universe
deb http://debian.ustc.edu.cn/ubuntu/ karmic-updates main multiverse restricted universe
deb-src http://debian.ustc.edu.cn/ubuntu/ karmic main multiverse restricted universe
deb-src http://debian.ustc.edu.cn/ubuntu/ karmic-backports main multiverse restricted universe
deb-src http://debian.ustc.edu.cn/ubuntu/ karmic-proposed main multiverse restricted universe
deb-src http://debian.ustc.edu.cn/ubuntu/ karmic-security main multiverse restricted universe
deb-src http://debian.ustc.edu.cn/ubuntu/ karmic-updates main multiverse restricted universe

# 中国地质大学(北京)更新服务器:
deb http://www.tofree.org/ubuntu/ karmic main restricted universe multiverse
deb http://www.tofree.org/ubuntu/ karmic-security main restricted universe multiverse
deb http://www.tofree.org/ubuntu/ karmic-updates main restricted universe multiverse
deb http://www.tofree.org/ubuntu/ karmic-proposed main restricted universe multiverse
deb http://www.tofree.org/ubuntu/ karmic-backports main restricted universe multiverse
deb-src http://www.tofree.org/ubuntu/ karmic main restricted universe multiverse
deb-src http://www.tofree.org/ubuntu/ karmic-security main restricted universe multiverse
deb-src http://www.tofree.org/ubuntu/ karmic-updates main restricted universe multiverse
deb-src http://www.tofree.org/ubuntu/ karmic-proposed main restricted universe multiverse
deb-src http://www.tofree.org/ubuntu/ karmic-backports main restricted universe multiverse

# mirror.rootguide.org更新服务器(上海市 电信):
deb http://mirror.rootguide.org/ubuntu/ karmic main restricted universe multiverse
deb-src http://mirror.rootguide.org/ubuntu/ karmic main restricted universe multiverse
deb http://mirror.rootguide.org/ubuntu/ karmic-updates main restricted universe multiverse
deb-src http://mirror.rootguide.org/ubuntu/ karmic-updates main restricted universe multiverse
deb http://mirror.rootguide.org/ubuntu/ karmic-backports main restricted universe multiverse
deb-src http://mirror.rootguide.org/ubuntu/ karmic-backports main restricted universe multiverse
deb http://mirror.rootguide.org/ubuntu/ karmic-security main restricted universe multiverse
deb-src http://mirror.rootguide.org/ubuntu/ karmic-security main restricted universe multiverse
deb http://mirror.rootguide.org/ubuntu/ karmic-proposed main multiverse restricted universe
deb-src http://mirror.rootguide.org/ubuntu/ karmic-proposed main restricted universe multiverse

 

 

3 还必须加上这么两句:

deb http://us.archive.ubuntu.com/ubuntu/ dapper universe

deb http://us.archive.ubuntu.com/ubuntu/ dapper universe multiverse

 

4 apt-get update

 

5 apt-get install sun-java5-jdk

 

最后,如果这样还不行,就需要修改系统设置->网络代理->直接连接到internet,然后运用到整个系统。

 

6 配置一下默认使

#set java environment

export JAVA_HOME=/usr/lib/jvm/java-1.5.0-sun

export JRE_HOME=JAVA_HOME/jre

export CLASSPATH=$JAVA_HOME/lib:$JRE_HOME/lib:$CLASSPATH

export PATH=$JAVA_HOME/bin:$JRE_HOME/bin:~/bin:$PATH

export ANDROID_JAVA_HOME=$JAVA_HOME用java5,要不就会使用系统自带的jdk. 

 

 

sudo update-alternatives --config java

sudo update-java-alternatives -s java-1.5.0-sun

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值