首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Ubuntu 14.04.4 LTS不工作的更新

Ubuntu 14.04.4 LTS不工作的更新
EN

Ask Ubuntu用户
提问于 2016-06-30 15:06:48
回答 1查看 1.1K关注 0票数 0

当我使用以下方法运行update命令时:

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

我说错了:

代码语言:javascript
复制
Ign http://archive.ubuntu.com trusty/universe Translation-en_IN
Reading package lists... Done 
W: Failed to fetch http://archive.ubuntu.com|security.ubuntu.com/ubuntu/dists/trusty-security/InRelease  

W: Failed to fetch http://archive.ubuntu.com|security.ubuntu.com/ubuntu/dists/trusty-security/Release.gpg  Could not resolve 'archive.ubuntu.com|security.ubuntu.com'

W: Some index files failed to download. They have been ignored, or old ones used instead.

我的ubuntu版本是Ubuntu14.04.4LTS

我曾多次尝试使用不同的论坛来修复这个问题,但都没有成功。

请建议我怎么修理它。

/etc/apt/sources.list含量

代码语言:javascript
复制
#deb cdrom:[Ubuntu 14.04.3 LTS _Trusty Tahr_ - Beta amd64 (20150805)]/ trusty main restricted

# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.

## Major bug fix updates produced after the final release of the
## distribution.
# deb http://in.archive.ubuntu.com|security.ubuntu.com/ubuntu/ trusty-updates main restricted
# deb-src http://in.archive.ubuntu.com|security.ubuntu.com/ubuntu/ trusty-updates main restricted

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
# deb http://in.archive.ubuntu.com|security.ubuntu.com/ubuntu/ trusty universe
# deb-src http://in.archive.ubuntu.com|security.ubuntu.com/ubuntu/ trusty universe
# deb http://in.archive.ubuntu.com|security.ubuntu.com/ubuntu/ trusty-updates universe
# deb-src http://in.archive.ubuntu.com|security.ubuntu.com/ubuntu/ trusty-updates universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu 
## team, and may not be under a free licence. Please satisfy yourself as to 
## your rights to use the software. Also, please note that software in 
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
# deb http://in.archive.ubuntu.com|security.ubuntu.com/ubuntu/ trusty multiverse
# deb-src http://in.archive.ubuntu.com|security.ubuntu.com/ubuntu/ trusty multiverse
# deb http://in.archive.ubuntu.com|security.ubuntu.com/ubuntu/ trusty-updates multiverse
# deb-src http://in.archive.ubuntu.com|security.ubuntu.com/ubuntu/ trusty-updates multiverse

## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.

deb http://archive.ubuntu.com|security.ubuntu.com/ubuntu trusty-security main restricted
deb http://archive.ubuntu.com|security.ubuntu.com/ubuntu trusty-security universe
deb http://archive.ubuntu.com|security.ubuntu.com/ubuntu trusty-security multiverse

## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb http://archive.canonical.com/ubuntu trusty partner
# deb-src http://archive.canonical.com/ubuntu trusty partner

## This software is not part of Ubuntu, but is offered by third-party
## developers who want to ship their latest software.
# deb http://extras.ubuntu.com/ubuntu trusty main
# deb-src http://extras.ubuntu.com/ubuntu trusty main
deb http://archive.ubuntu.com/ubuntu trusty main universe restricted multiverse
deb http://archive.ubuntu.com/ubuntu trusty-updates main restricted universe multiverse
EN

回答 1

Ask Ubuntu用户

回答已采纳

发布于 2016-06-30 15:42:35

您的/etc/apt/sources.list文件有问题。在源行中,不应该有任何带有in.archive.ubuntu.com|security.ubuntu.com的行。

使用以下方法保存源文件的备份:

代码语言:javascript
复制
cp -a /etc/apt/sources.list /etc/apt/sources.list.bak

然后使用sed更正当前源文件:

代码语言:javascript
复制
sed -i 's/in.archive.ubuntu.com|security.ubuntu.com/in.archive.ubuntu.com/g' /etc/apt/sources.list

紧接着是

代码语言:javascript
复制
sed -i 's/archive.ubuntu.com|security.ubuntu.com/security.ubuntu.com/g' /etc/apt/sources.list

在此之后,您的apt-get命令应该会正常工作。

实际上,我只是注意到所有的印度镜像(in.archive.ubuntu.com)都被注释掉了,这些命令已经修复了这些条目,但是它们没有被使用。

问题来自与安全更新有关的错误条目。当您更新时,您将收到安全更新,其余的更新将来自主要的Ubuntu镜像,从本地镜像(即in.archive.ubuntu.com条目)更新可能会更快。

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

https://askubuntu.com/questions/793182

复制
相关文章

相似问题

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