9

I've noticed that running apt-get update recently has resulted in quite a few ppa's returning "403 Forbidden". In and effort to clean them up I had a look:

W: Failed to fetch http://ppa.launchpad.net/gnome3-team/gnome3/ubuntu/dists/raring/main/binary-amd64/Packages  403  Forbidden

W: Failed to fetch http://ppa.launchpad.net/gnome3-team/gnome3/ubuntu/dists/raring/main/binary-i386/Packages  403  Forbidden

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

The strange things is, if I copy these URLs into my browser I can access the files just fine. Why would apt-get report "403 Forbidden" if they're still accessible? I tried re-adding the ppa through add-apt-repository which downloads the signing key again, and it still reported "403 Forbidden".

1
  • i don't have squid or any other proxy, and still get these errors Commented Jun 7, 2014 at 12:39

3 Answers 3

14

So it turns out this is an issue with squid-deb-proxy. Unfortunately it doesn't add PPAs and other repositories and just fails with an rather unexpected 403 error.

You can fix this by adding the repositories to the config file:

/etc/squid-deb-proxy/mirror-dstdomain.acl

# launchpad personal package archives (disabled by default) 
ppa.launchpad.net                                           
private-ppa.launchpad.net                                   

Of course, uninstalling squid-deb-proxy also works around the issue:

apt-get remove squid-deb-proxy
3
  • 2
    For the curious, this means uncommenting the ppa.launchpad.net line in /etc/squid-deb-proxy/mirror-dstdomain.acl.d/10-default. Commented Dec 21, 2014 at 23:38
  • 1
    Don't forget to sudo service squid-deb-proxy restart after doing this.
    – Irfan
    Commented Feb 28, 2016 at 12:15
  • I was trying sudo service squid-deb-proxy reload but this did not appears to reload the dstdomain.acl, a service restart was required as said by Power-Inside above. Commented Oct 12, 2016 at 5:06
2

Are you using proxy?

I have often experience this error, even when using main server.I noticed that this happens when apt-get process breaks for some reason. For instance when running apt-get update downloading of some file coudn't be completed. You will there after get 403 error for that particular file.

I learned that these partially downloaded files (I am not sure if they are exactly the files) during apt-get update are stored in /var/lib/apt/lists/partial/

So I did sudo rm -r /var/lib/apt/lists/partial/*(deleted all files in the directory)

After this I din't get the 403 error.

If you are getting the error when running apt-get install or apt-get upgrade or apt-get dist-upgrade

try sudo rm -r /var/cache/apt/archives/partial/*

1

I use intelligent mirror. I had to apt clean all then remove my previously downloaded deb files in my squid's /var/spool/squid3/intelligentmirror/deb directory to get it to continue.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .