首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >运行apt-get更新和apt-get安装mysql-server时出错

运行apt-get更新和apt-get安装mysql-server时出错
EN

Ask Ubuntu用户
提问于 2013-01-18 22:46:51
回答 6查看 34.1K关注 0票数 12

从昨天开始我就一直想跑

代码语言:javascript
复制
apt-get update

在我正在EC2上创建的Ubuntu实例中,失败了。

具体来说,我得到了这些错误:

代码语言:javascript
复制
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-server,我也收到了错误:

代码语言:javascript
复制
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# 

我确实跑了

代码语言:javascript
复制
apt-get update --fix-missing

没有任何运气。

有什么想法吗?

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

EN

回答 6

Ask Ubuntu用户

回答已采纳

发布于 2013-01-21 14:27:44

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

代码语言:javascript
复制
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

谢谢你的回复。

票数 6
EN

Ask Ubuntu用户

发布于 2013-03-13 18:50:57

这是一个已知臭虫与亚马逊S3。要解决这个问题,只需运行sudo apt-get update

票数 15
EN

Ask Ubuntu用户

发布于 2013-05-16 22:43:06

截至2012年4月10日,Ubuntu10.10 Maverick的寿命已经结束,这意味着没有进一步的更新(甚至没有安全修复),软件包档案也从archive.ubuntu.com转移到old-releases.ubuntu.com,这也是您看到错误的原因。

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

票数 7
EN
页面原文内容由Ask Ubuntu提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://askubuntu.com/questions/244822

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档