当我使用以下方法运行update命令时:
sudo apt-get update我说错了:
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含量
#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发布于 2016-06-30 15:42:35
您的/etc/apt/sources.list文件有问题。在源行中,不应该有任何带有in.archive.ubuntu.com|security.ubuntu.com的行。
使用以下方法保存源文件的备份:
cp -a /etc/apt/sources.list /etc/apt/sources.list.bak然后使用sed更正当前源文件:
sed -i 's/in.archive.ubuntu.com|security.ubuntu.com/in.archive.ubuntu.com/g' /etc/apt/sources.list紧接着是
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条目)更新可能会更快。
https://askubuntu.com/questions/793182
复制相似问题