Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Where can I find the error codes returned by a failed apt-get update command? Can you please point me to the code, or specs, that calls out the error messages returned from an apt-get update failure? Thanks.

Go ahead and ignore the rest of this question if you can answer the first one. Bonus points if you can add additional information.

What are the recommended solutions to resolve those problems?

Currently, I have three error codes that I have commonly encountered and I am wondering if there are more that I should be aware of.

  1. NO_PUBKEY
  2. BADSIG
  3. 403 Forbidden
  4. 404 Not Found
  5. Duplicate sources.list entry

Here are the workarounds for the errors that I am aware of:

NO_PUBKEY

Solution: add new public gpg key to my trusted chain by running the command:

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys <insert pub_key_here>

BADSIG

Solution: re-add key

sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com <insert key here>

403 Forbidden

Solution: ?

404 Not found

Solution: Site is unavailable. Either wait until site returns, or remove repository from sources.list.

Duplicate sources.list entry

Solution: ?

How many other error codes are there returned by apt-get update that prevent users from updating their software? Is there documentation somewhere to identify similar issues?

I understand the risks involved when I am implicitly trusting third parties when I am adding their keys to my trusted chain. I am looking to identify the known errors generated by a failed apt-get update and the solutions to allow me to continue to update my packages.

share|improve this question
1  
For the 404 error, check out askubuntu.com/questions/65911/… to add more info. –  saji89 Dec 28 '12 at 10:55
    
This looks like a good candidate for a community wiki. –  saji89 Dec 28 '12 at 11:25
1  
You're welcome. I'm saji89, not sajai89. :) –  saji89 Dec 28 '12 at 11:26
    
Thankyou for the correction. :) Kudos for your effort. It is good to have a community wiki for this. –  saji89 Dec 28 '12 at 11:51
1  
I think the downvotes are due to the fact that this question isn't going to help anybody. It's better to have a question for every specific case, otherwise giving solutions is impossible. For example: the two HTTP errors (403 and 404) can't be "fixed". It's the HTTP server that gives such errors, not APT. And the HTTP server is out of your control, so you can't do anything about it, except contacting the administrator. –  Andrea Corbellini Dec 28 '12 at 11:56

1 Answer 1

Some other errors are:

  • 403 Forbidden
  • Duplicate sources.list entry

Since I don't know the specific solution to it, I will leave it as community wiki.

share|improve this answer
    
Is the downvoter not aware that this is a community wiki and he can add more information to it? –  saji89 Dec 28 '12 at 11:50
    
Downvoting is actually good for moderation of useless posts. I'm ok with downvotes, but it makes complete sense only when they tell us why we're downvoted. –  saji89 Dec 28 '12 at 11:59
    
@maggotbrain, Actually the FAQ says that a comment need to be added, for downvotes: askubuntu.com/faq#behonest The flipside is that the donwvoter is doing so at the cost of 1 point of his. So he must have some reason for it. –  saji89 Dec 28 '12 at 12:08

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.