如何解决安装最新 Google Chrome Debian 时出现的重复源警告问题?

如何解决安装最新 Google Chrome Debian 时出现的重复源警告问题?

apt我正在将我的 Google Chrome 从 53.x 更新到 56.x,此时使用 google-chrome-stable 。我没有对旧的 Google Chrome 版本做任何事情,因为不确定如何处理它。我/etc/apt/sources.list的 Debian 8.5

#

deb http://ftp.fi.debian.org/debian/ jessie main
#deb http://ftp.us.debian.org/debian/ jessie main
deb-src http://ftp.fi.debian.org/debian/ jessie main
#deb-src http://ftp.us.debian.org/debian/ jessie main

deb http://security.debian.org/ jessie/updates main contrib
deb-src http://security.debian.org/ jessie/updates main contrib

# jessie-updates, previously known as 'volatile'
deb http://ftp.fi.debian.org/debian/ jessie-updates main contrib
#deb http://ftp.us.debian.org/debian/ jessie-updates main contrib
deb-src http://ftp.fi.debian.org/debian/ jessie-updates main contrib
#deb-src http://ftp.us.debian.org/debian/ jessie-updates main contrib

# jessie backports
deb http://http.debian.net/debian jessie-backports main contrib non-free

# Debian 8 "Jessie"
deb http://httpredir.debian.org/debian/ jessie main contrib

deb http://cran.wu.ac.at/bin/linux/debian jessie-cran3/

这样做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: You may want to run apt-get update to correct these problems

我以 root 身份安装了新的 Google Chrome

# http://askubuntu.com/questions/510056/how-to-install-google-chrome
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - 
sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list'
apt-get update 
apt-get install google-chrome-stable

操作系统:Debian 8.5
Linux 内核:4.7
硬件:华硕 Zenbook UX303UB

答案1

以下命令:

sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list'

将向google-chrome.list您的/etc/apt/sources.list.d.检查它ls /etc/apt/sources.list.d然后删除重复的条目。

如果您只有一个条目,您应该检查该google-chrome.list文件,然后在下面注释掉重复的 URL。/etc/apt/sources.list.d/google-chrome.list

相关内容