红联Linux门户
Linux帮助

Ubuntu12.04_X64 apt-get install报错404

发布时间:2015-09-21 21:55:50来源:linux网站作者:wkyb608

apt-get install gcc 


不能正确安装, 最后错误显示如下:

Need to get 859 kB/27.1 MB of archives. 
After this operation, 55.5 MB of additional disk space will be used. 
Do you want to continue [Y/n]? Y 
Err http://cn.archive.ubuntu.com/ubuntu/ precise-security/main linux-libc-dev amd64 3.2.0-51.77 
404  Not Found 
Err http://cn.archive.ubuntu.com/ubuntu/ precise-updates/main linux-libc-dev amd64 3.2.0-51.77 
404  Not Found 
Err http://cn.archive.ubuntu.com/ubuntu/ precise-proposed/main linux-libc-dev amd64 3.2.0-51.77 
404  Not Found 
Failed to fetch http://cn.archive.ubuntu.com/ubuntu/pool/main/l/linux/linux-libc-dev_3.2.0-51.77_amd64.deb  404  Not Found 
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing? 
root@production2:~#  


查看/etc/apt/sources.list

root@product:~# ls /etc/apt/ 
apt.conf.d sources.list   sources.list.dtrustdb.gpg  trusted.gpg.d 
preferences.d  sources.list.20130930  sources.list.english  trusted.gpg 


是配置的http://cn.archive.ubuntu.com/ubuntu/;

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 

再安装gcc, 正确了安装。


ubuntu不能使用apt-get命令,404 Not Found:http://www.linuxdiyf.com/linux/13949.html

Ubuntu Kylin 15.04下的PPA源会报404,执行apt-get update卡死:http://www.linuxdiyf.com/linux/12047.html

apt-get update更新源列表出现404 Not Found错误:http://www.linuxdiyf.com/linux/9969.html

解决Ubuntu运行命令‘APT-GET UPDATE‘时‘404 NOT FOUND’错误:http://www.linuxdiyf.com/linux/6528.html