Cyberithub

Solved "E: Unable to fetch some archives, maybe run apt-get update"

Advertisements

In this article, we will see how to solve E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing? error if you are also getting this error in your system. If you are using a Ubuntu/Debian based systems then it is not very uncommon to get this error when you try to install a package from default ubuntu repo.

Something similar happened to me as well when I tried to install curl package in my ubuntu 20.04 LTS system. While I was not expecting this error but I certainly understood the cause of the error so before solving this problem I decided to write an article about this so that it will help you folks as well.

 

Solved "E: Unable to fetch some archives, maybe run apt-get update"

Solved "E: Unable to fetch some archives, maybe run apt-get update"

Also Read: How to Install lastcomm command on Linux Using 6 Easy Steps

To explain further, when I tried to install curl package from default ubuntu repo by using sudo apt install curl command then I noticed below error on the output.

cyberithub@ubuntu:~$ sudo apt install curl
[sudo] password for cyberithub:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following package was automatically installed and is no longer required:
libappstream-glib8
Use 'sudo apt autoremove' to remove it.
The following NEW packages will be installed:
curl
0 upgraded, 1 newly installed, 0 to remove and 2 not upgraded.
Need to get 161 kB of archives.
After this operation, 413 kB of additional disk space will be used.
Ign:1 http://in.archive.ubuntu.com/ubuntu focal-updates/main amd64 curl amd64 7.68.0-1ubuntu2.16
Err:1 http://security.ubuntu.com/ubuntu focal-updates/main amd64 curl amd64 7.68.0-1ubuntu2.16
404 Not Found [IP: 91.189.91.38 80]
E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/c/curl/curl_7.68.0-1ubuntu2.16_amd64.deb 404 Not Found [IP: 91.189.91.38 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

While above E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing? error could occur due to multiple reasons but in my case it was occurred because some of the updates were paused before completion so to fix the above error I just had to update my system using sudo apt update command as shown below.

cyberithub@ubuntu:~$ sudo apt update
Get:1 https://dl.winehq.org/wine-builds/ubuntu focal InRelease [8,041 B]
Get:2 https://dl.google.com/linux/chrome/deb stable InRelease [1,811 B]
Hit:3 http://ppa.launchpad.net/flatpak/stable/ubuntu focal InRelease
Hit:4 http://in.archive.ubuntu.com/ubuntu focal InRelease
Get:5 http://security.ubuntu.com/ubuntu focal-security InRelease [114 kB]
Get:6 https://dl.winehq.org/wine-builds/ubuntu focal/main amd64 Packages [393 kB]
Get:7 http://in.archive.ubuntu.com/ubuntu focal-updates InRelease [114 kB]
Get:8 https://dl.winehq.org/wine-builds/ubuntu focal/main i386 Packages [395 kB]
Hit:9 https://download.sublimetext.com apt/stable/ InRelease
Get:10 https://dl.google.com/linux/chrome/deb stable/main amd64 Packages [1,078 B]
Get:11 http://in.archive.ubuntu.com/ubuntu focal-backports InRelease [108 kB]
Get:12 http://security.ubuntu.com/ubuntu focal-security/main i386 Packages [569 kB]
Get:13 http://in.archive.ubuntu.com/ubuntu focal-updates/main i386 Packages [798 kB]
Get:14 http://security.ubuntu.com/ubuntu focal-security/main amd64 Packages [2,049 kB]
Get:15 http://in.archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages [2,430 kB]
Get:16 http://in.archive.ubuntu.com/ubuntu focal-updates/main Translation-en [416 kB]
Get:17 http://security.ubuntu.com/ubuntu focal-security/main Translation-en [334 kB]
Get:18 http://in.archive.ubuntu.com/ubuntu focal-updates/main amd64 DEP-11 Metadata [275 kB]
Get:19 http://security.ubuntu.com/ubuntu focal-security/main amd64 DEP-11 Metadata [59.9 kB]
Get:20 http://security.ubuntu.com/ubuntu focal-security/main amd64 c-n-f Metadata [12.5 kB]
Get:21 http://in.archive.ubuntu.com/ubuntu focal-updates/main amd64 c-n-f Metadata [16.4 kB]
Get:22 http://security.ubuntu.com/ubuntu focal-security/restricted amd64 Packages [1,561 kB]
Get:23 http://in.archive.ubuntu.com/ubuntu focal-updates/restricted amd64 Packages [1,671 kB]
Get:24 http://security.ubuntu.com/ubuntu focal-security/restricted i386 Packages [29.2 kB]
Get:25 http://security.ubuntu.com/ubuntu focal-security/restricted Translation-en [220 kB]
Get:26 http://security.ubuntu.com/ubuntu focal-security/restricted amd64 c-n-f Metadata [624 B]
Get:27 http://security.ubuntu.com/ubuntu focal-security/universe i386 Packages [589 kB]
Get:28 http://in.archive.ubuntu.com/ubuntu focal-updates/restricted Translation-en [235 kB]
Get:29 http://in.archive.ubuntu.com/ubuntu focal-updates/universe amd64 Packages [1,039 kB]
Get:30 http://security.ubuntu.com/ubuntu focal-security/universe amd64 Packages [813 kB]
Get:31 http://in.archive.ubuntu.com/ubuntu focal-updates/universe i386 Packages [719 kB]
Get:32 http://in.archive.ubuntu.com/ubuntu focal-updates/universe Translation-en [244 kB]
Get:33 http://security.ubuntu.com/ubuntu focal-security/universe Translation-en [162 kB]
Get:34 http://in.archive.ubuntu.com/ubuntu focal-updates/universe amd64 DEP-11 Metadata [409 kB]
Get:35 http://security.ubuntu.com/ubuntu focal-security/universe amd64 DEP-11 Metadata [95.7 kB]
Get:36 http://security.ubuntu.com/ubuntu focal-security/universe amd64 c-n-f Metadata [17.5 kB]
Get:37 http://security.ubuntu.com/ubuntu focal-security/multiverse amd64 Packages [22.9 kB]
Get:38 http://security.ubuntu.com/ubuntu focal-security/multiverse amd64 DEP-11 Metadata [940 B]
Get:39 http://security.ubuntu.com/ubuntu focal-security/multiverse amd64 c-n-f Metadata [516 B]
Get:40 http://in.archive.ubuntu.com/ubuntu focal-updates/universe amd64 c-n-f Metadata [24.0 kB]
Get:41 http://in.archive.ubuntu.com/ubuntu focal-updates/multiverse amd64 DEP-11 Metadata [944 B]
Get:42 http://in.archive.ubuntu.com/ubuntu focal-backports/main amd64 DEP-11 Metadata [7,984 B]
Get:43 http://in.archive.ubuntu.com/ubuntu focal-backports/universe i386 Packages [13.8 kB]
Get:44 http://in.archive.ubuntu.com/ubuntu focal-backports/universe amd64 Packages [24.9 kB]
Get:45 http://in.archive.ubuntu.com/ubuntu focal-backports/universe amd64 DEP-11 Metadata [30.5 kB]
Get:46 http://in.archive.ubuntu.com/ubuntu focal-backports/universe amd64 c-n-f Metadata [880 B]
Fetched 16.0 MB in 7s (2,147 kB/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done

Once updated, I again tried to install the package using same sudo apt install curl command. This time I noticed that the package installed successfully as you can also see below.

cyberithub@ubuntu:~$ sudo apt install curl
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following package was automatically installed and is no longer required:
libappstream-glib8
Use 'sudo apt autoremove' to remove it.
The following additional packages will be installed:
libcurl4
The following NEW packages will be installed:
curl
The following packages will be upgraded:
libcurl4
1 upgraded, 1 newly installed, 0 to remove and 25 not upgraded.
Need to get 397 kB of archives.
After this operation, 417 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://in.archive.ubuntu.com/ubuntu focal-updates/main amd64 libcurl4 amd64 7.68.0-1ubuntu2.18 [236 kB]
Get:2 http://in.archive.ubuntu.com/ubuntu focal-updates/main amd64 curl amd64 7.68.0-1ubuntu2.18 [161 kB]
Fetched 397 kB in 1s (309 kB/s)
(Reading database ... 199902 files and directories currently installed.)
Preparing to unpack .../libcurl4_7.68.0-1ubuntu2.18_amd64.deb ...
Unpacking libcurl4:amd64 (7.68.0-1ubuntu2.18) over (7.68.0-1ubuntu2.16) ...
Selecting previously unselected package curl.
Preparing to unpack .../curl_7.68.0-1ubuntu2.18_amd64.deb ...
Unpacking curl (7.68.0-1ubuntu2.18) ...
Setting up libcurl4:amd64 (7.68.0-1ubuntu2.18) ...
Setting up curl (7.68.0-1ubuntu2.18) ...
Processing triggers for man-db (2.9.1-1) ...
Processing triggers for libc-bin (2.31-0ubuntu9.9) ...

This confirms that E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing? error resolved successfully. Sometimes, it may be possible that the above solution which worked for me may not work for you. In that case, I would suggest you to run below commands in sequence to install any missing packages which might had been uninstalled and see if it helps solving your E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing? error.

sudo apt clean
sudo apt update
sudo apt install --fix-missing

Further you can also simply run sudo apt update --fix-missing command to install the missing updates.

sudo apt update --fix-missing

Hope, above solution should be enough to solve your E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing? error. Please let me know your feedback in the comment box !!

1 thought on “Solved "E: Unable to fetch some archives, maybe run apt-get update"”

  1. Hi,
    I have entered the ssh root@localhost. There I need to update and install some python packages. Even though I ran the commands you gave in this article, but same problem persists.
    Can you give me another solution?
    Thanks

    Reply

Leave a Comment