每次使用 apt-get 时都会出现 500 内部服务器错误

每次使用 apt-get 时都会出现 500 内部服务器错误

我正在运行 ubuntu 12.04

每当我尝试 apt-get install/upgrade 时,我都会收到大量“500 内部服务器错误”错误。aptitude 也会产生完全相同的错误。我知道网上应该有“无数”关于这个问题的帖子,但它们似乎都对我不起作用。其中大多数似乎与安装特定软件包有关,但我得到了错误每当我使用 apt-get 或 aptitude

我知道这应该是一个一般错误,但 /var/log/apt 文件夹中没有任何内容提供任何信息,甚至没有确认该错误。(其中仅有的两个文件是 term.log 和 history.log)。

根据一些人的建议,我修改了 /etc/apt/sources.list 文件,以便前三行

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

但这些也会产生错误。

有人可以根据这些信息提出建议,或者建议我如何获得更具信息量的错误描述吗?

提前感谢帮助

以下是我从 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

~
~

答案1

所以我的问题是我设置了一个环境变量,该变量内置于我的登录脚本中。

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

这是一次连接到我的图书馆的徒劳尝试,因为 chrome 不允许您设置代理连接。(它不起作用)。

如果 apt-get 提供任何诊断输出,我早就知道了。但是它没有(在未来的版本中它将是伟大的如果提供了详细选项。)

感谢@gertfdijk 的帮助,我尝试了以下

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

它为我提供了追踪错误所需的诊断信息。

相关内容