“apt-get update” 给出“W:无法获取 http://archive.scrapy.org/ubuntu/dists/scrapy/...”

“apt-get update” 给出“W:无法获取 http://archive.scrapy.org/ubuntu/dists/scrapy/...”

操作系统:Ubuntu 14.04

我尝试运行“sudo apt-get update”,但结果却导致与 Scrapy 相关的错误。我甚至“清除”(卸载)了 Scrapy,但仍然出现此错误。

.....

Ign http://archive.ubuntu.com trusty/restricted Translation-en_US              
Ign http://archive.ubuntu.com trusty/universe Translation-en_US                
Reading package lists... Done                                                  
W: Failed to fetch http://archive.scrapy.org/ubuntu/dists/scrapy/InRelease  

W: Failed to fetch http://archive.scrapy.org/ubuntu/dists/scrapy/Release.gpg  Could not resolve 'archive.scrapy.org'

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

答案1

检查/etc/apt/sources.list.d/目录中是否存在 scrapy。
还要检查此文件:/etc/apt/sources.list如果有条目,则删除指向 scrapy 的行。

此后,sudo apt update应该不再显示这些错误消息。

答案2

所以我做了这两个步骤

sudo mv /etc/apt/sources.list.d/scrapy.list /etc/apt/sources.list_deleted

sudo mv /etc/apt/sources.list.d/scrapy.list.save /etc/apt/sources.list_save_deleted

sudo apt-get update

相关内容