2015年6月13日 星期六

apt-get update之更新non-LTS套件之解法


Ubuntu之非NON-LTS(Long Term Support)版本,通常9個月後就不再support,所以apt-get update更新往往就會看到找不到package的錯誤。 此時這些舊的package都會被移到http://old-releases.ubuntu.com/,所以要改一下路徑apt package的路徑。

brook@vista:~$ cat /etc/issue
Ubuntu 13.04 \n \l
 
brook@vista:~$ sudo apt-get update
[sudo] password for brook:
Ign http://extras.ubuntu.com raring Release.gpg
Ign http://archive.ubuntu.com raring Release.gpg
....
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/raring-security/main/binary-i386/Packages  404  Not Found [IP: 91.189.88.149 80]
 
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/raring-security/restricted/binary-i386/Packages  404  Not Found [IP: 91.189.88.149 80]
 
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/raring-security/universe/binary-i386/Packages  404  Not Found [IP: 91.189.88.149 80]
 
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/raring-security/multiverse/binary-i386/Packages  404  Not Found [IP: 91.189.88.149 80]
 
E: Some index files failed to download. They have been ignored, or old ones used instead.




Solution:

brook@vista:~$ cat /etc/apt/sources.list
#deb http://old-releases.ubuntu.com/ raring-security main
#deb http://old-releases.ubuntu.com/ubuntu/dists/raring-security/restricted/ raring-security main
deb http://old-releases.ubuntu.com/ubuntu/ raring main
deb http://old-releases.ubuntu.com/ubuntu/ raring universe


    參考資料:
  1. Ubuntu LTS(Long Term Support)
  2. Old Ubuntu Releases





2 則留言:

  1. apt-get可以搭配-o Debug::進行debug, 比如,
    sudo apt-get update -o Debug::Acquire::http=1
    其餘的Debug option可以參考man apt.conf

    回覆刪除
  2. ----- Hash Sum mismatch issue -----
    http://www.webhek.com/post/linux-apt-get-update-hash-sum-mismatch-error.html

    root@vista:~# apt-get update

    Fetched 8480 kB in 1s (5928 kB/s)
    AppStream cache update completed, but some metadata was ignored due to errors.
    Reading package lists... Done
    E: Failed to fetch store:/var/lib/apt/lists/partial/tw.archive.ubuntu.com_ubuntu_dists_xenial-updates_restricted_dep11_Com
    ponents-amd64.yml Hash Sum mismatch
    E: Failed to fetch http://tw.archive.ubuntu.com/ubuntu/dists/xenial-updates/multiverse/dep11/icons-64x64.tar
    E: Some index files failed to download. They have been ignored, or old ones used instead.

    root@vista:~# apt-get clean
    root@vista:~# rm -rf /var/lib/apt/lists/*
    root@vista:~# apt-get clean
    root@vista:~# apt-get update

    回覆刪除

熱門文章