运行apt-get update和apt-get install mysql-server时出错


11

从昨天开始我一直在尝试跑步

apt-get update

在EC2上创建的Ubuntu实例中未成功。

具体来说,我一直在得到这些错误:

Ign http://security.ubuntu.com maverick-security/main amd64 Packages
Ign http://security.ubuntu.com maverick-security/universe amd64 Packages
Ign http://security.ubuntu.com maverick-security/multiverse amd64 Packages
Err http://security.ubuntu.com maverick-security/main Sources
  404  Not Found [IP: 91.189.92.190 80]
Err http://security.ubuntu.com maverick-security/universe Sources
  404  Not Found [IP: 91.189.92.190 80]
Err http://security.ubuntu.com maverick-security/main amd64 Packages
  404  Not Found [IP: 91.189.92.190 80]
Err http://security.ubuntu.com maverick-security/universe amd64 Packages
  404  Not Found [IP: 91.189.92.190 80]
Err http://security.ubuntu.com maverick-security/multiverse amd64 Packages
  404  Not Found [IP: 91.189.92.190 80]
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/maverick-security/main/source/Sources.gz  404  Not Found [IP: 91.189.92.190 80]

W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/maverick-security/universe/source/Sources.gz  404  Not Found [IP: 91.189.92.190 80]

W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/maverick-security/main/binary-amd64/Packages.gz  404  Not Found [IP: 91.189.92.190 80]

W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/maverick-security/universe/binary-amd64/Packages.gz  404  Not Found [IP: 91.189.92.190 80]

W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/maverick-security/multiverse/binary-amd64/Packages.gz  404  Not Found [IP: 91.189.92.190 80]

E: Some index files failed to download, they have been ignored, or old ones used instead.
root@ip-10-168-230-63:/etc/apt# 

另外尝试安装mysql服务器,我一直得到错误:

root@ip-10-168-230-63:/etc/apt# apt-get install mysql-server
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  libhtml-template-perl mysql-server-5.1 mysql-server-core-5.1
Suggested packages:
  libipc-sharedcache-perl tinyca mailx
The following NEW packages will be installed:
  libhtml-template-perl mysql-server mysql-server-5.1 mysql-server-core-5.1
0 upgraded, 4 newly installed, 0 to remove and 81 not upgraded.
Need to get 12.1MB/12.2MB of archives.
After this operation, 29.5MB of additional disk space will be used.
Do you want to continue [Y/n]? Y
Err http://us-west-1.ec2.archive.ubuntu.com/ubuntu/ maverick-updates/main mysql-server-core-5.1 amd64 5.1.61-0ubuntu0.10.10.1
  403  Forbidden
Err http://us-west-1.ec2.archive.ubuntu.com/ubuntu/ maverick-updates/main mysql-server-5.1 amd64 5.1.61-0ubuntu0.10.10.1
  403  Forbidden
Err http://us-west-1.ec2.archive.ubuntu.com/ubuntu/ maverick-updates/main mysql-server all 5.1.61-0ubuntu0.10.10.1
  403  Forbidden
Failed to fetch http://us-west-1.ec2.archive.ubuntu.com/ubuntu/pool/main/m/mysql-5.1/mysql-server-core-5.1_5.1.61-0ubuntu0.10.10.1_amd64.deb  403  Forbidden
Failed to fetch http://us-west-1.ec2.archive.ubuntu.com/ubuntu/pool/main/m/mysql-5.1/mysql-server-5.1_5.1.61-0ubuntu0.10.10.1_amd64.deb  403  Forbidden
Failed to fetch http://us-west-1.ec2.archive.ubuntu.com/ubuntu/pool/main/m/mysql-5.1/mysql-server_5.1.61-0ubuntu0.10.10.1_all.deb  403  Forbidden
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
root@ip-10-168-230-63:/etc/apt# 

我跑了

apt-get update --fix-missing

没有任何运气。

有任何想法吗?

我已经在AWS EC2中运行的Ubuntu Linux实例上多次完成了这些任务,没有任何问题。在此先感谢您的帮助!


特立独行(10.10)已于2012年4月到达生命终结,请参阅http://fridge.ubuntu.com/2012/04/10/ubuntu-10-10-maverick-meerkat-end-of-life-reached-on-april- 2012
10

Answers:


14

这是Amazon S3 的已知错误。要解决此问题,只需运行sudo apt-get update


即使这不是OP原始问题的解决方案(使用过时的LTS),我还是在12.04上遇到了相同的错误,并且您的解决方案已将其修复,因此+1
Tobias J

3
他在运行时遇到问题,apt-get update因此建议您运行apt-get update
塞林2015年

6

解决方法是将这些行添加到sources.list:

deb http://us.archive.ubuntu.com/ubuntu lucid main multiverse universe
deb http://us.archive.ubuntu.com/ubuntu lucid-security main multiverse universe
deb http://us.archive.ubuntu.com/ubuntu lucid-updates main multiverse universe

感谢您的答复。


2
提防:这也将有一天停止工作。您已经不会通过archive.ubuntu.com接收安全更新。如果您要保持LTS正常运行,建议您升级到或重新安装12.04。
Rinzwind 2013年

6

自2012年4月10日起,Ubuntu 10.10 Maverick Meerkat的寿命已到(EOL),这意味着没有进一步的更新(甚至没有安全修复程序),并且软件包存档已从archive.ubuntu.com移至old-releases.ubuntu.com,这就是您看到此错误的原因。

编辑/etc/apt/sources.list修复您的软件包源。请注意,您还需要删除us-west-1.ec2前缀:没有用于EOL版本的专用EC2软件包服务器。


3

有了这个建议,以及其他提到的“存档”更改为“旧版本”的注释,以下代码片段帮助我前进了。

sudo sed 's@http://archive\.ubuntu\.com/@http://old-releases.ubuntu.com/@' -i /etc/apt/sources.list
sudo apt-get update
sudo apt-get upgrade

然后我就可以安装所需的任何软件包(以php5-sqlite为例)



0

安全组->出站

*   ALL Traffic ALL     ALL     0.0.0.0/0   Allow

如果您想连接到google.com之类的外部服务器,甚至想要更新,请允许出站-sudo apt-get update

您可以使用AWS前端转到安全组->出站来允许出站

确保为您的AWS实例选择正确的组

By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.