Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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
2  
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
add comment

2 Answers

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

share|improve this answer
add comment

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 release.ubuntu.com to archive.ubuntu.com. Or something. Or maybe a mirror you are using is down.

share|improve this answer
add comment

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.