2

I'm running ubuntu 12.04

I'm getting a huge number of "500 Internal Server Error" errors whenever I try to apt-get install/upgrade. aptitude yields exactly the same errors. I know there are supposed to be "zillions" of threads about this on the web but none of them seem to work for me. Most of them seem to be related to installing a specific package, but I get the errors whenever I use apt-get or aptitude

I know this is supposed to be a generic error, but there's nothing in the /var/log/apt folder that provides any information, or even acknowledges the error. (The only two files in there are term.log and history.log).

As some have recommended, I've modified my /etc/apt/sources.list file so that the top three lines are

deb http://us-west-1.ec2.archive.ubuntu.com/ubuntu/ precise main restricted universe multiverse
deb http://us-west-1.ec2.archive.ubuntu.com/ubuntu/ precise-updates main restricted universe multiverse
deb http://us-west-1.ec2.archive.ubuntu.com/ubuntu/ precise-security main restricted universe multiverse

But these are giving errors as well.

Can anybody please advise based on this information, or suggest how I can get a more informative error description?

Thanks for help in advance

Here are just a few of errors I get from apt-get upgrade

Err http://archive.canonical.com precise/partner amd64 Packages 500  Internal Server Error
Err http://archive.canonical.com precise/partner i386 Packages 500  Internal Server Error
Err http://archive.canonical.com precise/partner Sources 500  Internal Server Error
Err http://dl.google.com stable/main amd64 Packages 500  Internal Server Error
Err http://dl.google.com stable/main i386 Packages 500  Internal Server Error
Err http://extras.ubuntu.com precise/main amd64 Packages 500  Internal Server Error
Err http://extras.ubuntu.com precise/main i386 Packages 500  Internal Server Error
Err http://extras.ubuntu.com precise/main Sources 500  Internal Server Error
Err http://ppa.launchpad.net precise/main amd64 Packages 500  Internal Server Error
Err http://ppa.launchpad.net precise/main i386 Packages 500  Internal Server Error
Err http://ppa.launchpad.net precise/main Sources 500  Internal Server Error
Err http://security.ubuntu.com precise-security/main amd64 Packages 500  Internal Server Error
Err http://security.ubuntu.com precise-security/main i386 Packages 500  Internal Server Error
Err http://security.ubuntu.com precise-security/main Sources 500  Internal Server Error
Err http://security.ubuntu.com precise-security/multiverse amd64 Packages 500  Internal Server Error
Err http://security.ubuntu.com precise-security/multiverse i386 Packages 500  Internal Server Error
Err http://security.ubuntu.com precise-security/multiverse Sources 500  Internal Server Error
Err http://security.ubuntu.com precise-security/restricted amd64 Packages 500  Internal Server Error
Err http://security.ubuntu.com precise-security/restricted i386 Packages 500  Internal Server Error
Err http://security.ubuntu.com precise-security/restricted Sources 500  Internal Server Error
...
Err http://us-west-1.ec2.archive.ubuntu.com precise/main amd64 Packages 500  Internal Server Error
Err http://us-west-1.ec2.archive.ubuntu.com precise/main i386 Packages 500  Internal Server Error
Err http://us-west-1.ec2.archive.ubuntu.com precise/multiverse amd64 Packages 500  Internal Server Error
Err http://us-west-1.ec2.archive.ubuntu.com precise/multiverse i386 Packages 500  Internal Server Error
Err http://us-west-1.ec2.archive.ubuntu.com precise/restricted amd64 Packages 500  Internal Server Error
Err http://us-west-1.ec2.archive.ubuntu.com precise/restricted i386 Packages 500  Internal Server Error
Err http://us-west-1.ec2.archive.ubuntu.com precise-security/main amd64 Packages 500  Internal Server Error
Err http://us-west-1.ec2.archive.ubuntu.com precise-security/main i386 Packages 500  Internal Server Error
Err http://us-west-1.ec2.archive.ubuntu.com precise-security/multiverse amd64 Packages 500  Internal Server Error
Err http://us-west-1.ec2.archive.ubuntu.com precise-security/multiverse i386 Packages 500  Internal Server Error
Err http://us-west-1.ec2.archive.ubuntu.com precise-security/restricted amd64 Packages 500  Internal Server Error
Err http://us-west-1.ec2.archive.ubuntu.com precise-security/restricted i386 Packages 500  Internal Server Error
Err http://us-west-1.ec2.archive.ubuntu.com precise-security/universe amd64 Packages 500  Internal Server Error

~
~

Leo Simon
  • 1,529
  • 2
    Have you tried using another mirror? (regular one instead of Amazon) The one you're using from Amazon seems to be having some difficulties... An HTTP 5xx error means it's a server error (their fault). Also check if you are using a proxy and include that information. – gertvdijk Apr 09 '13 at 21:52
  • have you run apt-get update? – wlraider70 Apr 10 '13 at 00:21
  • Thanks for your responses! Yep @wlraider70, when I run apt-get update I get 70 Internal server errors, after sorting and uniq'ing. – Leo Simon Apr 10 '13 at 13:56
  • Thanks @gertvdijk. I've tried changing mirrors several different ways, like from ubuntu to mirrors.math.ucdavis.edu and using the "deb mirrors" Always the same number of 500 Errors. This suggests to me that the problem is caused by something stupid that I did rather than it being their fault, like changing permissions of something, but I don't know how to debug the error. The only ways I know how to check if I'm using a proxy is to look in apt.conf, which doesn't exist, and .cshrc (I'm using tcsh) but there is no indication that I am. Is there another way? – Leo Simon Apr 10 '13 at 13:58
  • 1
    Ah now I re-read your error output I see it is about multiple domains. It is very likely this is something locally on your machine. I suspect a proxy server configured or some other configuration issue like DNS not working. Please check the output of grep -ri proxy /etc/apt and try to download a simple file from the repo, e.g. wget "http://security.ubuntu.com/ubuntu/dists/precise-security/Release.gpg" -O - (yes -O -). – gertvdijk Apr 10 '13 at 14:33
  • 1
    @gertvdijk, Ahhh! thank you so much for your help. The download was exactly what I needed to diagnose the problem. A while ago, I'd set an environment variable "http_proxy" to try to get to my univ library. When I removed the variable, everything worked fine! – Leo Simon Apr 10 '13 at 15:11
  • @LeoSimon Glad to hear that you identified and fixed the issue. Please provide this as an answer to your own question. :) – gertvdijk Apr 10 '13 at 15:20
  • hello it sometimes might a problem with a source server.. "Software & update" -> "Ubuntu software" -> "Download from ..." ... try to change the source server here :) (ideally to the main server) or any close to you .. – Mr.P May 17 '20 at 02:17

1 Answers1

3

So my problem turned out to be that I'd set an environment variable, which was built into my login script.

setenv http_proxy http://proxy.lib.berkeley.edu:7777/proxy.pac

This was a vain attempt to connect to my library, since chrome in it's wisdom doesn't let you set a proxy connection. (It didn't work).

If apt-get provided any diagnostic output, I'd have figured this out ages ago. But it doesn't (In future releases it would be great if a verbose option were provided.)

Thanks to help from @gertfdijk, I tried the following

wget "http://security.ubuntu.com/ubuntu/dists/precise-security/Release.gpg" 

which provided me with the diagnostics I needed to track down the error.

Leo Simon
  • 1,529