“Failed to fetch” errors for PPAs …

You may start getting “Failed to fetch” error messages when updating your software sources (e.g. through “apt-get update” or “Reload package information” in Synaptic), which may be due to a bug we’ve just cleaned up in Launchpad’s PPAs.

The error looks like this:

  W: Failed to fetch http://ppa.launchpad.net/chromium-daily/ppa/ubuntu/dists/maverick/Release
  Unable to find expected entry  restricted/binary-i386/Packages in Meta-index file (malformed Release file?)

  E: Some index files failed to download, they have been ignored, or old ones used instead.

Fixing the cause of the error

Here’s how to fix it. In your terminal, type:

 sudo gedit /etc/apt/sources.list

In the editor, look for PPA sources — these are URLs that feature the ppa.launchpad.net domain. In this example, someone has set up the ~ubuntu-x-swat/x-updates PPA incorrectly:

 deb http://ppa.launchpad.net/ubuntu-x-swat/x-updates/ubuntu maverick main
 deb http://ppa.launchpad.net/ubuntu-x-swat/x-updates/ubuntu maverick restricted
 deb http://ppa.launchpad.net/ubuntu-x-swat/x-updates/ubuntu maverick universe
 deb http://ppa.launchpad.net/ubuntu-x-swat/x-updates/ubuntu maverick multiverse

All of these refer to different components within the same PPA. PPAs only have the first component, so you should delete lines for PPAs that don’t end in “main”. Watch out for lines that wrap, as with the “restricted”, “universe” and “multiverse” examples above.

You may also need to check source lists under the /etc/apt/sources.list.d directory.

Note: you should leave your standard Ubuntu sources, and any non-PPA sources, just as they are.

If you’re not sure how to do this, pop into #launchpad on freenode and one of the Launchpad community will help.

Why this has happened

The Debian-style archives used by Ubuntu are often divided into different components. With Ubuntu, you’ve probably heard of at least “main” and “universe”.

PPAs don’t use these components. However, a bug in Launchpad meant that, until December, PPAs were published with a number of different components. All of these components were empty and there was no way to publish anything to them.

Today, we started to remove these empty components from PPAs. The only impact we anticipate is that anyone whose sources.list referenced these components in a PPA will now see an error when performing an apt-get update or similar.

No packages are being deleted and anyone with a correctly defined sources.list will be able to carry on just as before.

(Originally from Julian.)

Tags: , , , ,

19 Responses to ““Failed to fetch” errors for PPAs …”

  1. seeker5528 Says:

    “Here’s how to fix it. In your terminal, type:

    sudo gedit /etc/apt/sources.list”

    I thought everybody was learned on how bad this is for any programs that may write configuration data, temporary files, backup files, etc… in your home directory. 😉

    Should use:

    gksudo gedit /etc/apt/sources.list

    : or :

    sudo -H gedit /etc/apt/sources.list

    So stuff written to $HOME, will go to root’s home.

    Later, Seeker

  2. Progone Says:

    this example was an easy fix for me and might work for others. In this example:

    W: Failed to fetch http://ppa.launchpad.net/openstack-release/2011.2/ubuntu/dists/oneiric/main/source/Sources 404 Not Found

    2011.2 no longer exist. I confirmed this by following the link to its parent. I tracked it back until a newer child link was available. Sure enough, 2011.3/ubuntu/dists/oneiric/main/source/Sources was there. After the confirmation I simply open the GUI of ‘Software Sources’ then clicked on ‘Other software’ tab and edited the correct line.

  3. charles Says:

    OK, so none of my sources in my /etc/apt/sources.list has any http://ppa.launchpad.net/* url
    HOWEVER I do get the error

    W: Failed to fetch http://ppa.launchpad.net/olivier-berten/misc/ubuntu/dists/lucid/main/binary-amd64/Packages.gz 404 Not Found

    So I’m guessing that some other of the vanilla sources are proxying the ppa.launchpad.net — I even commented out the universe/multiverse and kept only the main-restricted sources and still got the error!

  4. 83r110 Says:

    “OK, so none of my sources in my /etc/apt/sources.list has any http://ppa.launchpad.net/* url
    HOWEVER I do get the error”

    ‘$ ls -la /etc/apt/sources.list.d/’

  5. Launchpad failed to fetch error | Ubuntu InfoUbuntu Info Says:

    […] I’ve looked online and found an official solution for the problem: http://blog.launchpad.net/ppa/failed-to-fetch-errors-for-ppas […]

  6. naman Says:

    What if the lines end with main as well as restricted I mean line like ” deb http://in.archive.ubuntu.com/ubuntu/ precise main restricted
    deb-src http://in.archive.ubuntu.com/ubuntu/ precise main restricted” …do we have to delete these lines also??

  7. Martin D. Says:

    “fix404” is a simple script that checks for “404 not found” messages for all the PPAs added to your software sources and prompts you to disable them:
    http://www.webupd8.org/2011/07/get-rid-of-ppa-404-not-found-messages.html
    This is so easy ^_^

  8. cschell Says:

    Progone’s solution worked for me.

  9. Crsk Says:

    “OK, so none of my sources in my /etc/apt/sources.list has any http://ppa.launchpad.net/* url
    HOWEVER I do get the error

    W: Failed to fetch http://ppa.launchpad.net/olivier-berten/misc/ubuntu/dists/lucid/main/binary-amd64/Packages.gz 404 Not Found”

    same here, but I do get the error

    W: Failed to fetch http://ppa.launchpad.net/g2p/storage/ubuntu/dists/precise/main/source/Sources 404 Not Found

    /precise isn’t there

  10. Shash Says:

    Can any one please help me out to solve the error during installation of textlive
    After running installation command : sudo add-apt-repository ppa:texlive-backports/ppa

    It giving error:

    W: Failed to fetch http://ppa.launchpad.net/texlive-backports/ppa/ubuntu/dists/trusty/main/binary-amd64/Packages 404 Not Found

    W: Failed to fetch http://ppa.launchpad.net/texlive-backports/ppa/ubuntu/dists/trusty/main/binary-i386/Packages 404 Not Found

    E: Some index files failed to download. They have been ignored, or old ones used instead.
    E: Could not get lock /var/lib/dpkg/lock – open (11: Resource temporarily unavailable)
    E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?

  11. mweli Says:

    Hello,

    when I tried to update my Ubuntu 16.04, got this error message.

    &&&&&
    “E: Failed to fetch http://ppa.launchpad.net/ubuntu-on-rails/ppa/ubuntu/dists/xenial/main/binary-i386/Packages 404 Not Found
    E: Some index files failed to download. They have been ignored, or old ones used instead.”
    &&&&&

    I am having this issue as well. I open the gedit file, reads as follows:

    +++++++
    # deb cdrom:[Ubuntu 16.04 LTS _Xenial Xerus_ – Release i386 (20160420.1)]/ xenial main restricted

    # See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
    # newer versions of the distribution.
    deb http://us.archive.ubuntu.com/ubuntu/ xenial main restricted
    # deb-src http://us.archive.ubuntu.com/ubuntu/ xenial main restricted

    ## Major bug fix updates produced after the final release of the
    ## distribution.
    deb http://us.archive.ubuntu.com/ubuntu/ xenial-updates main restricted
    # deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-updates main restricted

    ## 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
    ## universe WILL NOT receive any review or updates from the Ubuntu security
    ## team.
    deb http://us.archive.ubuntu.com/ubuntu/ xenial universe
    # deb-src http://us.archive.ubuntu.com/ubuntu/ xenial universe
    deb http://us.archive.ubuntu.com/ubuntu/ xenial-updates universe
    # deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-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://us.archive.ubuntu.com/ubuntu/ xenial multiverse
    # deb-src http://us.archive.ubuntu.com/ubuntu/ xenial multiverse
    deb http://us.archive.ubuntu.com/ubuntu/ xenial-updates multiverse
    # deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-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://us.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse
    # deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe 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://archive.canonical.com/ubuntu xenial partner
    # deb-src http://archive.canonical.com/ubuntu xenial partner

    deb http://security.ubuntu.com/ubuntu xenial-security main restricted
    # deb-src http://security.ubuntu.com/ubuntu xenial-security main restricted
    deb http://security.ubuntu.com/ubuntu xenial-security universe
    # deb-src http://security.ubuntu.com/ubuntu xenial-security universe
    deb http://security.ubuntu.com/ubuntu xenial-security multiverse
    # deb-src http://security.ubuntu.com/ubuntu xenial-security multiverse

    ++++++++++++++

    I’m surprised by the first paragraph.

    >>>
    ## 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
    ## universe WILL NOT receive any review or updates from the Ubuntu security
    ## team.
    <<<

    Can someone help me out with this please.

    Thank you very much in advance!!!

    Weli

  12. Ian McDonald Says:

    Where has http://ppa.launchpad.net/mc3man/trust-media/ubuntu moved to? It’s meant to be the custom repository for nodeJS on Linux Mint, and is my obstacle to installing.

  13. Colin Watson Says:

    To the various people having difficulty finding where PPAs have moved to: your best bet is to find the relevant Launchpad user page (e.g. http://ppa.launchpad.net/mc3man/… -> https://launchpad.net/~mc3man) and ask the user in question, or admins of the team in question, what you should do. Launchpad only maintains the infrastructure here.

  14. Denis Coene Says:

    :The repository ‘http://ppa.launchpad.net/ubuntu-wine/ppa/ubuntu zesty Release’ does not have a Release file.

    What do i do with these errors?
    even downloaded a zip file to install, although the terminal won´t accept to install due to the zesty security paths and due to no legal ppa sources to accommodate in the software to run on the computers, many of Linux software, does n´t fit the needs to accomplish organizing the Android hardware devices, for checking IMEI numbers correcting them, all of these software are Windows related,although Linux play, does n´t supported neither?

    Any suggestions to get the right software that might do the work intended to do?

    Sincerely yours

    Denis (Des) Coene

  15. lrv Says:

    Launchpad TRULY sucks..
    I just have apt errors all the time and none of this helps.
    It would be better to not make launchpad available.
    It seriously breaks apt and is a royal nuisance.

  16. Colin Watson Says:

    lrv (#14), that sounds like you’ve misconfigured something. Blog comments sections are a really cumbersome way to debug that kind of thing, though. Could you post details either at https://answers.launchpad.net/launchpad/+addquestion, to launchpad-users@lists.launchpad.net, or on https://askubuntu.com/ with the “ppa” tag, and we’ll try to help you out?

  17. Mahesh Dudhal Says:

    this worked for me.
    create/update apt.conf file in folder /etc/apt
    the content of apt.conf should be as follow where ‘x.x.x.x:port’ is your proxy:

    Acquire::http::proxy “http://x.x.x.x:port/”;
    Acquire::https::proxy “https://x.x.x.x:port/”;
    Acquire::ftp::proxy “ftp://x.x.x.x:port/”;
    Acquire::socks::proxy “socks://x.x.x.x:port/”;

  18. redhwan nasser Says:

    I wanted to update boost from 1.54 to 1.55, I get this output:
    W: Failed to fetch http://ppa.launchpad.net/boost-latest/ppa/ubuntu/dists/trusty/main/binary-amd64/Packages 404 Not Found

    W: Failed to fetch http://ppa.launchpad.net/boost-latest/ppa/ubuntu/dists/trusty/main/binary-i386/Packages 404 Not Found

    E: Some index files failed to download. They have been ignored, or old ones used instead.
    my sources.lis
    # deb cdrom:[Ubuntu 14.04.5 LTS _Trusty Tahr_ – Release amd64 (20160803)]/ trusty main restricted

    # See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
    # newer versions of the distribution.
    deb http://kr.archive.ubuntu.com/ubuntu/ trusty main restricted
    deb-src http://kr.archive.ubuntu.com/ubuntu/ trusty main restricted

    ## Major bug fix updates produced after the final release of the
    ## distribution.
    deb http://kr.archive.ubuntu.com/ubuntu/ trusty-updates main restricted
    deb-src http://kr.archive.ubuntu.com/ubuntu/ trusty-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://kr.archive.ubuntu.com/ubuntu/ trusty universe
    deb-src http://kr.archive.ubuntu.com/ubuntu/ trusty universe
    deb http://kr.archive.ubuntu.com/ubuntu/ trusty-updates universe
    deb-src http://kr.archive.ubuntu.com/ubuntu/ trusty-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://kr.archive.ubuntu.com/ubuntu/ trusty multiverse
    deb-src http://kr.archive.ubuntu.com/ubuntu/ trusty multiverse
    deb http://kr.archive.ubuntu.com/ubuntu/ trusty-updates multiverse
    deb-src http://kr.archive.ubuntu.com/ubuntu/ trusty-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://kr.archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse
    deb-src http://kr.archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse

    deb http://security.ubuntu.com/ubuntu trusty-security main restricted
    deb-src http://security.ubuntu.com/ubuntu trusty-security main restricted
    deb http://security.ubuntu.com/ubuntu trusty-security universe
    deb-src http://security.ubuntu.com/ubuntu trusty-security universe
    deb http://security.ubuntu.com/ubuntu trusty-security multiverse
    deb-src http://security.ubuntu.com/ubuntu trusty-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://archive.canonical.com/ubuntu trusty partner
    # deb-src http://archive.canonical.com/ubuntu trusty partner

    ## This software is not part of Ubuntu, but is offered by third-party
    ## developers who want to ship their latest software.
    deb http://extras.ubuntu.com/ubuntu trusty main
    deb-src http://extras.ubuntu.com/ubuntu trusty main

    please anyone help me
    thank you in advanced

  19. Luso Says:

    try
    https://itsfoss.com/repository-does-not-have-release-file-error-ubuntu/

Leave a Reply