If you are working with a old version of Ubuntu that has reached the end of their support (EOL – end of life). You can be got a error when you use apt-get command like the below:
1 2 3 4 5 6 |
Ign http://archive.ubuntu.com raring Release.gpg Ign http://security.ubuntu.com raring-security Release.gpg Ign http://archive.ubuntu.com raring-updates Release.gpg Ign http://archive.ubuntu.com raring-backports Release.gpg Ign http://security.ubuntu.com raring-security Release Ign http://archive.ubuntu.com raring Release |
There are some reasons make apt-get command do not work, e.g: no internet connection, not correct DNS server, …. However, in this article, I just talk about the reason come from the version of Ubuntu that has reached the end of the support. It means the original repositories are closed and no longer able to install software. So you have to set the repository list so that it references to the server – old releases.ubuntu.com (as show below).
Firstly, check your version of Ubuntu:
1 |
lsb_release -dc |
Or
1 |
cat /etc/*release |
Now, open the repository list file /etc/apt/source.list and replace all the code by:
1 2 3 4 5 6 7 8 9 10 11 12 13 |
deb http://old-releases.ubuntu.com/ubuntu/ CODENAME main universe restricted multiverse deb-src http://old-releases.ubuntu.com/ubuntu/ CODENAME main universe restricted multiverse deb http://old-releases.ubuntu.com/ubuntu/ CODENAME-security main universe restricted multiverse deb-src http://old-releases.ubuntu.com/ubuntu/ CODENAME-security main universe restricted multiverse deb http://old-releases.ubuntu.com/ubuntu/ CODENAME-updates main universe restricted multiverse deb-src http://old-releases.ubuntu.com/ubuntu/ CODENAME-updates main universe restricted multiverse deb http://old-releases.ubuntu.com/ubuntu/ CODENAME-backports main restricted universe multiverse deb-src http://old-releases.ubuntu.com/ubuntu/ CODENAME-backports main restricted universe multiverse deb http://old-releases.ubuntu.com/ubuntu/ CODENAME-proposed main restricted universe multiverse deb-src http://old-releases.ubuntu.com/ubuntu/ CODENAME-proposed main restricted universe multiverse |
Taking care to replace the term CODENAME with the code name for the version of Ubuntu derived in the previous step. (e.g: raring)
After done editing sources.list, type:
1 |
apt-get update |
You are done.