Salam Alaekum,
If you are having trouble using apt-get in Ubuntu 12.4 As showed in the image below . . .
then try below solutions …
Solution # 1 (Updated 5th-NOV-2021]
Edit the existing apt source file
nano /etc/apt/sources.list
Remove all entries & use paste below
deb http://old-releases.ubuntu.com/ubuntu/ precise main restricted deb-src http://old-releases.ubuntu.com/ubuntu/ precise main restricted deb http://old-releases.ubuntu.com/ubuntu/ precise-updates main restricted deb-src http://old-releases.ubuntu.com/ubuntu/ precise-updates main restricted deb http://old-releases.ubuntu.com/ubuntu/ precise universe deb-src http://old-releases.ubuntu.com/ubuntu/ precise universe deb http://old-releases.ubuntu.com/ubuntu/ precise-updates universe deb-src http://old-releases.ubuntu.com/ubuntu/ precise-updates universe deb http://old-releases.ubuntu.com/ubuntu/ precise multiverse deb-src http://old-releases.ubuntu.com/ubuntu/ precise multiverse deb http://old-releases.ubuntu.com/ubuntu/ precise-updates multiverse deb-src http://old-releases.ubuntu.com/ubuntu/ precise-updates multiverse deb http://old-releases.ubuntu.com/ubuntu/ precise-backports main restricted universe multiverse deb-src http://old-releases.ubuntu.com/ubuntu/ precise-backports main restricted universe multiverse deb http://old-releases.ubuntu.com/ubuntu precise-security main restricted deb-src http://old-releases.ubuntu.com/ubuntu precise-security main restricted deb http://old-releases.ubuntu.com/ubuntu precise-security universe deb-src http://old-releases.ubuntu.com/ubuntu precise-security universe deb http://old-releases.ubuntu.com/ubuntu precise-security multiverse deb-src http://old-releases.ubuntu.com/ubuntu precise-security multiverse
Save & Exit & update
apt-get update
Solution # 2
sudo rm /var/lib/apt/lists/* -vf sudo apt-get clean sudo apt-get autoremove sudo apt-get dist-upgrade sudo apt-get update --fix-missing sudo apt-get update
Solution # 3
Run below cmd
sudo sed -i -e 's/archive.ubuntu.com\|security.ubuntu.com/old-releases.ubuntu.com/g' /etc/apt/sources.list
& try to update now
apt-get update
Hopefully the issue will be solved : )
As shown in the image below . . .
Regard’s
Syed Jahanzaib
assalamualaikum..terima kasih banyak sangat membantu
LikeLike
Comment by alibunker — October 11, 2013 @ 12:31 PM
Sir…….Assalaaam o Alekom…..
Sir…………thanks apt-get working But apt-get install dnsmasq is not woking ………..
In your squid configuration …..! first= apt-get install dnsmasq and 2nd apt-get update.
can i change the steps……? first= apt-get update and 2nd apt-get install dnsmasq
do i change these steps . will any problem create squid server…..?
ALLAH aap ko JAZAEKHAIR dey………..
LikeLike
Comment by Waqar — October 12, 2013 @ 2:16 PM
Its working fine here.
first update, then install any other required package.
LikeLike
Comment by Syed Jahanzaib / Pinochio~:) — October 18, 2013 @ 11:17 AM
thnx sir jahanzaib … aagar aap nhn hote to humara kiya hota……
LikeLike
Comment by Haji Amad Soomro — October 21, 2013 @ 9:48 PM
Thx Sir. your this page Helps alot and fixed ma isue
LikeLike
Comment by Ash — November 27, 2013 @ 1:11 AM
Thanks dear this really solved my problem.
LikeLike
Comment by M. Shoaib arain — December 16, 2013 @ 3:42 PM
gr8
LikeLike
Comment by Syed Jahanzaib / Pinochio~:) — December 17, 2013 @ 9:06 AM
which previous line do u mean when u say ” Remove all previous lines and add following lines ” ?
LikeLike
Comment by sq — May 25, 2014 @ 10:52 PM
Err http://pk.archive.ubuntu.com saucy-updates InRelease
Err http://pk.archive.ubuntu.com saucy-backports InRelease
Err http://pk.archive.ubuntu.com saucy Release.gpg
Unable to connect to pk.archive.ubuntu.com:http:
Err http://pk.archive.ubuntu.com saucy-updates Release.gpg
Unable to connect to pk.archive.ubuntu.com:http:
Err http://pk.archive.ubuntu.com saucy-backports Release.gpg
Unable to connect to pk.archive.ubuntu.com:http:
Fetched 401 kB in 2min 0s (3,331 B/s)
Reading package lists… Done
W: Failed to fetch http://pk.archive.ubuntu.com/ubuntu/dists/saucy/InRelease
W: Failed to fetch http://pk.archive.ubuntu.com/ubuntu/dists/saucy-updates/InRelease
W: Failed to fetch http://pk.archive.ubuntu.com/ubuntu/dists/saucy-backports/InRelease
W: Failed to fetch http://pk.archive.ubuntu.com/ubuntu/dists/saucy/Release.gpg Unable to connect to pk.archive.ubuntu.com:http:
W: Failed to fetch http://pk.archive.ubuntu.com/ubuntu/dists/saucy-updates/Release.gpg Unable to connect to pk.archive.ubuntu.com:http:
W: Failed to fetch http://pk.archive.ubuntu.com/ubuntu/dists/saucy-backports/Release.gpg Unable to connect to pk.archive.ubuntu.com:http:
W: Some index files failed to download. They have been ignored, or old ones used instead.
LikeLike
Comment by sq — May 25, 2014 @ 11:06 PM
how do i fix this issue?
LikeLike
Comment by sq — May 25, 2014 @ 11:06 PM
AoA!
Dear Sir
I’m facing following error
W: Failed to fetch http://pk.archive.ubuntu.com/ubuntu/dist/bionic/InRelease Could not resolve ‘pk.archive.ubuntu.com’
W: Failed to fetch http://pk.archive.ubuntu.com/ubuntu/dist/bionic-updates/InRelease Could not resolve ‘pk.archive.ubuntu.com’
W: Failed to fetch http://pk.archive.ubuntu.com/ubuntu/dist/bionic-proposed/InRelease Could not resolve ‘pk.archive.ubuntu.com’
W: Failed to fetch http://pk.archive.ubuntu.com/ubuntu/dist/bionic-backports/InRelease Could not resolve ‘pk.archive.ubuntu.com’
W: Failed to fetch http://pk.archive.ubuntu.com/ubuntu/dist/bionic-security/InRelease Could not resolve ‘pk.archive.ubuntu.com’
W: Some index files failed to download. They have been ignored, or old ones used instead.
W: Target Sources (main/source/Sources) is configured multiple times in etc/apt/sources.list:19 and /etc/apt/source.list:29
W: Target Sources (resstricted/source/Sources) is configured multiple times in etc/apt/sources.list:19 and /etc/apt/source.list:29
W: Target Sources (universe/source/Sources) is configured multiple times in etc/apt/sources.list:19 and /etc/apt/source.list:29
W: Target Sources (multiverse/source/Sources) is configured multiple times in etc/apt/sources.list:19 and /etc/apt/source.list:29
LikeLike
Comment by Aziz Ullah — November 6, 2019 @ 11:27 AM
Check your DNS resolving !
LikeLike
Comment by Syed Jahanzaib / Pinochio~:) — November 11, 2019 @ 10:25 PM
Ubuntu Linux 12.04 sources.list worked
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://old-releases.ubuntu.com/ubuntu/ precise main restricted
deb-src http://old-releases.ubuntu.com/ubuntu/ precise main restricted
## Major bug fix updates produced after the final release of the
## distribution.
deb http://old-releases.ubuntu.com/ubuntu/ precise-updates main restricted
deb-src http://old-releases.ubuntu.com/ubuntu/ precise-updates main restricted
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://old-releases.ubuntu.com/ubuntu/ precise universe
deb-src http://old-releases.ubuntu.com/ubuntu/ precise universe
deb http://old-releases.ubuntu.com/ubuntu/ precise-updates universe
deb-src http://old-releases.ubuntu.com/ubuntu/ precise-updates universe
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://old-releases.ubuntu.com/ubuntu/ precise multiverse
deb-src http://old-releases.ubuntu.com/ubuntu/ precise multiverse
deb http://old-releases.ubuntu.com/ubuntu/ precise-updates multiverse
deb-src http://old-releases.ubuntu.com/ubuntu/ precise-updates multiverse
## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://old-releases.ubuntu.com/ubuntu/ precise-backports main restricted universe multiverse
deb-src http://old-releases.ubuntu.com/ubuntu/ precise-backports main restricted universe multiverse
deb http://old-releases.ubuntu.com/ubuntu precise-security main restricted
deb-src http://old-releases.ubuntu.com/ubuntu precise-security main restricted
deb http://old-releases.ubuntu.com/ubuntu precise-security universe
deb-src http://old-releases.ubuntu.com/ubuntu precise-security universe
deb http://old-releases.ubuntu.com/ubuntu precise-security multiverse
deb-src http://old-releases.ubuntu.com/ubuntu precise-security multiverse
## Uncomment the following two lines to add software from Canonical’s
## ‘partner’ repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb http://old-releases.ubuntu.com/ubuntu precise partner
# deb-src http://old-releases.ubuntu.com/ubuntu precise partner
## Uncomment the following two lines to add software from Ubuntu’s
## ‘extras’ repository.
## This software is not part of Ubuntu, but is offered by third-party
## developers who want to ship their latest software.
# deb http://old-releases.ubuntu.com/ubuntu precise main
# deb-src http://old-releases.ubuntu.com/ubuntu precise main
LikeLike
Comment by Serkan Erdogdu — October 5, 2021 @ 5:30 AM
good
LikeLike
Comment by Syed Jahanzaib / Pinochio~:) — October 5, 2021 @ 8:23 AM