Xenial Failed to fetch...404 on any package install

7,685

The Ubuntu ports repository does not include any x86 packages, which is why you see these errors:

E: Failed to fetch http://ports.ubuntu.com/ubuntu ports/dists/xenial/main/binary-i386/Packages  404  Not Found [IP: 91.189.88.150 80]
E: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/dists/xenial-updates/main/binary-i386/Packages  404  Not Found [IP: 91.189.88.150 80]
E: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/dists/xenial-security/main/binary-i386/Packages  404  Not Found [IP: 91.189.88.150 80]

Because of these errors, no package list from this repository was loaded. So the armhf packages that would have been otherwise available aren't.

Since you don't seem to be using i386 repos, just remove that, and run apt-get update again:

sudo dpkg --remove-architecture i386
sudo apt update

The ports.ubuntu.com package lists should now be downloaded in /var/lib/apt/lists/, and packages should be available.

Share:
7,685

Related videos on Youtube

Merk
Author by

Merk

Updated on September 18, 2022

Comments

  • Merk
    Merk over 1 year

    If I use apt-get install git I get the following errors:

    Err:1 http://ports.ubuntu.com/ubuntu-ports xenial-security/main armhf git- man all 1:2.7.4-0ubuntu1.3 404  Not Found [IP: 91.189.88.150 80]
    
    Err:2 http://ports.ubuntu.com/ubuntu-ports xenial-security/main armhf git armhf 1:2.7.4-0ubuntu1.3 404  Not Found [IP: 91.189.88.150 80]
    E: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/pool/main/g/git/git-man_2.7.4-0ubuntu1.3_all.deb  404  Not Found [IP: 91.189.88.150 80]
    
    E: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/pool/main/g/git/git_2.7.4-0ubuntu1.3_armhf.deb  404  Not Found [IP: 91.189.88.150 80]
    

    Similar errors are thrown when I install any other package.

    I have been changing up my sources.list file, but nothing seems to help.

    Here are the contents of my sources.list file:

    deb http://ports.ubuntu.com/ubuntu-ports/ xenial main restricted universe multiverse
    deb-src http://ports.ubuntu.com/ubuntu-ports/ xenial main restricted universe multiverse
    deb http://ports.ubuntu.com/ubuntu-ports/ xenial-updates main restricted universe multiverse
    deb-src http://ports.ubuntu.com/ubuntu-ports/ xenial-updates main restricted universe multiverse
    deb http://ports.ubuntu.com/ubuntu-ports/ xenial-security main restricted universe multiverse
    deb https://dl.winehq.org/wine-builds/ubuntu/ xenial main
    # deb-src https://dl.winehq.org/wine-builds/ubuntu/ xenial main
    deb-src http://ports.ubuntu.com/ubuntu-ports/ xenial-security main restricted universe multiverse
    

    Output of apt-get update:

    N: Skipping acquire of configured file 'main/binary-armhf/Packages' as repository 'https://dl.winehq.org/wine-builds/ubuntu xenial InRelease' doesn't support architecture 'armhf'
    E: Failed to fetch http://ports.ubuntu.com/ubuntu ports/dists/xenial/main/binary-i386/Packages  404  Not Found [IP: 91.189.88.150 80]
    E: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/dists/xenial-updates/main/binary-i386/Packages  404  Not Found [IP: 91.189.88.150 80]
    E: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/dists/xenial-security/main/binary-i386/Packages  404  Not Found [IP: 91.189.88.150 80]
    E: Some index files failed to download. They have been ignored, or old ones used instead.
    

    Interestingly, when I visit 91.189.88.150 from my browser, it leads to the default apache server test page.

    My sources.list.d directory appears to be empty.

    I would greatly appreciate any advice

    • Merk
      Merk almost 6 years
      Done. sudo apt-get update doesn't seem to have helped
    • muru
      muru almost 6 years
      Add the output of dpkg --print-architecture and dpkg --print-foreign-architectures as well, please.
    • Merk
      Merk almost 6 years
      dpkg --print-architecture prints armhf and --print-foreign-architectures prints i386. It's worth noting that I'm not using i386 for emulation of anything important (I think).
  • Tim Bird
    Tim Bird over 3 years
    Just want to add that I had a problem installing sqlite3 and python3-venv from security.ubuntu.com, with similar error messages during apt-get install and apt update. It turned out that I had an extra foreign architecture arm64 configured on my machine, and removing it using these instructions solved that problem for me. The key bit in understanding this was that the arm64 error from the repository was masking getting any package list (even for amd64) from the respository at all. Thanks very much!