当我输入时,sudo apt-get update
我在终端中收到以下消息
W: Target Packages (main/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:52 and /etc/apt/sources.list.d/google-chrome.list:3
W: Target Packages (main/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:52 and /etc/apt/sources.list.d/google-chrome.list:3
W: Target Translations (main/i18n/Translation-en_US) is configured multiple times in /etc/apt/sources.list:52 and /etc/apt/sources.list.d/google-chrome.list:3
W: Target Translations (main/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:52 and /etc/apt/sources.list.d/google-chrome.list:3
W: Target DEP-11 (main/dep11/Components-amd64.yml) is configured multiple times in /etc/apt/sources.list:52 and /etc/apt/sources.list.d/google-chrome.list:3
W: Target DEP-11-icons (main/dep11/icons-64x64.tar) is configured multiple times in /etc/apt/sources.list:52 and /etc/apt/sources.list.d/google-chrome.list:3
W: Target Packages (main/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:52 and /etc/apt/sources.list.d/google-chrome.list:3
W: Target Packages (main/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:52 and /etc/apt/sources.list.d/google-chrome.list:3
W: Target Translations (main/i18n/Translation-en_US) is configured multiple times in /etc/apt/sources.list:52 and /etc/apt/sources.list.d/google-chrome.list:3
W: Target Translations (main/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:52 and /etc/apt/sources.list.d/google-chrome.list:3
W: Target DEP-11 (main/dep11/Components-amd64.yml) is configured multiple times in /etc/apt/sources.list:52 and /etc/apt/sources.list.d/google-chrome.list:3
W: Target DEP-11-icons (main/dep11/icons-64x64.tar) is configured multiple times in /etc/apt/sources.list:52 and /etc/apt/sources.list.d/google-chrome.list:3
我该如何解决?
答案1
当包管理器发现重复源时,就会出现每个警告消息。
要修复此问题,只需编辑源文件并删除或禁用其中一个源。
让我们解构一个示例行:
Target Packages (main/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:52 and /etc/apt/sources.list.d/google-chrome.list:3
现在我们再看一下:
Target Packages (PATH) is configured multiple times in FILE_1:LINE_1 and FILE_2:LINE_2
为了修复 PATH 的源 (main/binary-amd64/Packages,Google Chrome):
- 您可以删除
FILE_1:LINE_1
(/etc/apt/sources.list
,第 52 行) - 或者您可以删除
FILE_2:LINE_2
(/etc/apt/sources.list.d/google-chrome.list
,第 3 行)
警告:请勿删除所有FILE_1
或FILE_2
。您的系统需要这些文件。这些文件会告诉您的系统从哪里获取软件升级。切勿删除该文件/etc/apt/sources.list
- 它提供安全升级。