- 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.d trustdb.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, 正确了安装