红联Linux门户
Linux帮助

ubuntu12.04_amd apt-get isntall jdk.jre报错

发布时间:2016-02-01 11:07:14来源:linux网站作者:u010550992

编译android代码,要安装jdk.jre报错。
命令:
sudo apt-get install openjdk-7-jdk openjdk-7-jre


报错:
Err http://us.archive.ubuntu.com/ubuntu/ precise-updates/main libnss3 amd64 3.19.2.1-0ubuntu0.12.04.1
404  Not Found [IP: 91.189.91.13 80]
Err http://security.ubuntu.com/ubuntu/ precise-security/main libnss3 amd64 3.19.2.1-0ubuntu0.12.04.1
404  Not Found [IP: 91.189.91.23 80]
Err http://security.ubuntu.com/ubuntu/ precise-security/main libnss3-1d amd64 3.19.2.1-0ubuntu0.12.04.1
404  Not Found [IP: 91.189.91.23 80]
Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/n/nss/libnss3_3.19.2.1-0ubuntu0.12.04.1_amd64.deb  404  Not Found [IP: 91.189.91.23 80]
Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/n/nss/libnss3-1d_3.19.2.1-0ubuntu0.12.04.1_amd64.deb  404  Not Found [IP: 91.189.91.23 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?


解决办法:
把/etc/apt/sources.list,先备份一下.sources.list.bak
修改source.list内容为:

deb http://cn.archive.ubuntu.com/ubuntu/ precise main restricted universe multiverse 
deb http://cn.archive.ubuntu.com/ubuntu/ precise-security main restricted universe multiverse 
deb http://cn.archive.ubuntu.com/ubuntu/ precise-updates main restricted universe multiverse 
deb http://cn.archive.ubuntu.com/ubuntu/ precise-proposed main restricted universe multiverse 
deb http://cn.archive.ubuntu.com/ubuntu/ precise-backports main restricted universe multiverse 
deb-src http://cn.archive.ubuntu.com/ubuntu/ precise main restricted universe multiverse 
deb-src http://cn.archive.ubuntu.com/ubuntu/ precise-security main restricted universe multiverse 
deb-src http://cn.archive.ubuntu.com/ubuntu/ precise-updates main restricted universe multiverse 
deb-src http://cn.archive.ubuntu.com/ubuntu/ precise-proposed main restricted universe multiverse 
deb-src http://cn.archive.ubuntu.com/ubuntu/ precise-backports main restricted universe multiverse 


然后 sudo apt-get update
再执行:sudo apt-get install openjdk-7-jdk openjdk-7-jre 就可以了.


本文永久更新地址:http://www.linuxdiyf.com/linux/17820.html