W:部分索引文件下载失败。这些文件已被忽略,或使用旧文件代替。

W:部分索引文件下载失败。这些文件已被忽略,或使用旧文件代替。

我是 Ubuntu 新手,可能做了一些愚蠢的事情。

尝试更新,但出现令人厌烦的错误。

Reading package lists... Done                


W: Failed to fetch http://archive-canonical.com/dists/&(lsb_release-sc)/InRelease  
W: Failed to fetch http://archive-canonical.com/dists/&(lsb_release-sc)/Release.gpg  Could not resolve 'archive-canonical.com'
W: Some index files failed to download. They have been ignored, or old ones used instead.

在网上阅读了 abit 之后,似乎这里出了问题:gedit /etc/apt/sources.list

结果如下:

# deb cdrom:[Ubuntu 14.04.1 LTS _Trusty Tahr_ - Release amd64 (20140722.2)]/ trusty main restricted

# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://mirrors.telianet.dk/ubuntu/ trusty main restricted
deb-src http://mirrors.telianet.dk/ubuntu/ trusty main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb http://mirrors.telianet.dk/ubuntu/ trusty-updates main restricted
deb-src http://mirrors.telianet.dk/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://mirrors.telianet.dk/ubuntu/ trusty universe
deb-src http://mirrors.telianet.dk/ubuntu/ trusty universe
deb http://mirrors.telianet.dk/ubuntu/ trusty-updates universe
deb-src http://mirrors.telianet.dk/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://mirrors.telianet.dk/ubuntu/ trusty multiverse
deb-src http://mirrors.telianet.dk/ubuntu/ trusty multiverse
deb http://mirrors.telianet.dk/ubuntu/ trusty-updates multiverse
deb-src http://mirrors.telianet.dk/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://mirrors.telianet.dk/ubuntu/ trusty-backports main restricted universe multiverse
deb-src http://mirrors.telianet.dk/ubuntu/ trusty-backports main restricted universe multiverse

deb http://mirrors.telianet.dk/ubuntu/ trusty-security main restricted
deb-src http://mirrors.telianet.dk/ubuntu/ trusty-security main restricted
deb http://mirrors.telianet.dk/ubuntu/ trusty-security universe
deb-src http://mirrors.telianet.dk/ubuntu/ trusty-security universe
deb http://mirrors.telianet.dk/ubuntu/ trusty-security multiverse
deb-src http://mirrors.telianet.dk/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.

## 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 http://archive-canonical.com/ &(lsb_release-sc) partner
# deb-src http://archive-canonical.com/ &(lsb_release-sc) partner
deb-src http://extras.ubuntu.com/ubuntu trusty main

请帮助 :)

答案1

在您的/etc/apt/sources.list文件中,该行应如下所示:

deb http://archive.canonical.com/ubuntu trusty partner

它不起作用或者部分的格式错误$(lsb_release -sc)

希望这可以帮助!

答案2

更改源列表文件/etc/apt/

mv sources.list

https://repogen.simplylinux.ch/generate.php并创建一个新的源列表文件:

nano sources.list

保存并测试。

相关内容