安装 Google Chrome 测试版后,当我使用(sudo apt-get update
)此命令时,出现以下提示。
Reading package lists... Done
W: Duplicate sources.list entry http://dl.google.com/linux/chrome/deb/ stable/main amd64 Packages (/var/lib/apt/lists/dl.google.com_linux_chrome_deb_dists_stable_main_binary-amd64_Packages)
W: Duplicate sources.list entry http://dl.google.com/linux/chrome/deb/ stable/main i386 Packages (/var/lib/apt/lists/dl.google.com_linux_chrome_deb_dists_stable_main_binary-i386_Packages)
W: You may want to run apt-get update to correct these problems
答案1
您可以使用 sed 注释掉 /etc/apt/sources.list.d/google-chrome.list 中的条目:
sed -i '3 s/^/#/' /etc/apt/sources.list.d/google-chrome.list
这会在 google-chrome.list 文件第三行前面放置一个标签,如下所示:
# deb http://dl.google.com/linux/chrome/deb/ stable main