每当我运行时,sudo apt-get update
我都会收到以下错误和警告:
(尝试 Norbert 的解决方案后更新)
Reading package lists... Done
W: Target Packages (non-free/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:51 and /etc/apt/sources.list:54
W: Target Packages (non-free/binary-i386/Packages) is configured multiple times in /etc/apt/sources.list:51 and /etc/apt/sources.list:54
W: Target Packages (non-free/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:51 and /etc/apt/sources.list:54
W: Target Translations (non-free/i18n/Translation-en_IN) is configured multiple times in /etc/apt/sources.list:51 and /etc/apt/sources.list:54
W: Target Translations (non-free/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:51 and /etc/apt/sources.list:54
W: Target DEP-11 (non-free/dep11/Components-amd64.yml) is configured multiple times in /etc/apt/sources.list:51 and /etc/apt/sources.list:54
W: Target DEP-11-icons (non-free/dep11/icons-64x64.tar) is configured multiple times in /etc/apt/sources.list:51 and /etc/apt/sources.list:54
W: Target Packages (non-free/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:51 and /etc/apt/sources.list:54
W: Target Packages (non-free/binary-i386/Packages) is configured multiple times in /etc/apt/sources.list:51 and /etc/apt/sources.list:54
W: Target Packages (non-free/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:51 and /etc/apt/sources.list:54
W: Target Translations (non-free/i18n/Translation-en_IN) is configured multiple times in /etc/apt/sources.list:51 and /etc/apt/sources.list:54
W: Target Translations (non-free/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:51 and /etc/apt/sources.list:54
W: Target DEP-11 (non-free/dep11/Components-amd64.yml) is configured multiple times in /etc/apt/sources.list:51 and /etc/apt/sources.list:54
W: Target DEP-11-icons (non-free/dep11/icons-64x64.tar) is configured multiple times in /etc/apt/sources.list:51 and /etc/apt/sources.list:54
这是我的 /etc/apt/sources.list(已更新):
答案1
您需要修复几个问题:
... is configured multiple times in /etc/apt/sources.list:51 and /etc/apt/sources.list:54
- 通过手动编辑/etc/apt/sources.list
和注释掉重复的 54 行。手动删除包列表:
sudo rm -rf /var/lib/apt/lists/*
禁用没有 Xenial 软件包的 PPA:
sudo add-apt-repository -r ppa:picaso/octave sudo add-apt-repository -r ppa:samuellb/fribid sudo add-apt-repository -r ppa:tomahawk/ppa sudo add-apt-repository -r ppa:yorba/ppa
添加新鲜SpotifyGPG 密钥:
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 931FF8E79F0876134EDDBDCCA87FF9DF48BF1C90
更新软件包列表
sudo apt-get update
安装所有升级
sudo apt-get upgrade