Ubuntu12.04_X64 apt-get install 報錯404

Java代碼  收藏代碼
  1. apt-get install gcc  

 不能正確安裝, 最後錯誤顯示如下:

Java代碼  收藏代碼
  1. Need to get 859 kB/27.1 MB of archives.  
  2. After this operation, 55.5 MB of additional disk space will be used.  
  3. Do you want to continue [Y/n]? Y  
  4. Err http://cn.archive.ubuntu.com/ubuntu/ precise-security/main linux-libc-dev amd64 3.2.0-51.77  
  5.   404  Not Found  
  6. Err http://cn.archive.ubuntu.com/ubuntu/ precise-updates/main linux-libc-dev amd64 3.2.0-51.77  
  7.   404  Not Found  
  8. Err http://cn.archive.ubuntu.com/ubuntu/ precise-proposed/main linux-libc-dev amd64 3.2.0-51.77  
  9.   404  Not Found  
  10. 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  
  11. E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?  
  12. root@production2:~#   

 查看/etc/apt/sources.list

Java代碼  收藏代碼
  1. root@product:~# ls /etc/apt/  
  2. apt.conf.d     sources.list           sources.list.d        trustdb.gpg  trusted.gpg.d  
  3. preferences.d  sources.list.20130930  sources.list.english  trusted.gpg  

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

Java代碼  收藏代碼
  1. deb http://cn.archive.ubuntu.com/ubuntu/ precise main restricted universe multiverse  
  2. deb http://cn.archive.ubuntu.com/ubuntu/ precise-security main restricted universe multiverse  
  3. deb http://cn.archive.ubuntu.com/ubuntu/ precise-updates main restricted universe multiverse  
  4. deb http://cn.archive.ubuntu.com/ubuntu/ precise-proposed main restricted universe multiverse  
  5. deb http://cn.archive.ubuntu.com/ubuntu/ precise-backports main restricted universe multiverse  
  6. deb-src http://cn.archive.ubuntu.com/ubuntu/ precise main restricted universe multiverse  
  7. deb-src http://cn.archive.ubuntu.com/ubuntu/ precise-security main restricted universe multiverse  
  8. deb-src http://cn.archive.ubuntu.com/ubuntu/ precise-updates main restricted universe multiverse  
  9. deb-src http://cn.archive.ubuntu.com/ubuntu/ precise-proposed main restricted universe multiverse  
  10. deb-src http://cn.archive.ubuntu.com/ubuntu/ precise-backports main restricted universe multiverse  

 網上查詢了一下路徑, 此路徑是正確的.

 

所以最後更新一下源.

Java代碼  收藏代碼
  1. sudo apt-get update  

再安裝gcc, 正確了安裝

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章