Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have setup my ubuntu vps recently, but suddenly I keep getting this error message when I try to do apt-get update

E: Method gave invalid 400 URI Failure message

I have try to comment out 2 by 2 in my source list and do the apt-get update, no matter how I still getting the same error.

share|improve this question
This means that the servers you're attempting to access, or a proxy between you and the server receives a bad request. How's your luck if you try to access the server with curl? – Kvisle Oct 25 '11 at 14:33
do you mean I should test the very line of url in the apt source by curl ? – Knight Oct 27 '11 at 0:20
That is what I mean, yes. – Kvisle Oct 27 '11 at 5:33

it seem like is locale problem after i remove some locale setting, it work again.

share|improve this answer

If you share your /etc/apt/sources.list we can probably try to help you.

Otherwise, I wrote a tool to debug this (assumes you have ruby and rubygems installed):

server# gem install apt-repair-sources
server# apt-repair-sources

This should tell you which lines in your sources are off. I'm guessing it's something like, 11.04 was moved from to Or something. Or maybe a mirror you are using is down.

share|improve this answer

Your Answer


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.