我需要在 debian stable 上安装 google-chrome。有什么方法可以添加 google 的存储库并始终安装最新版本的 chrome?
答案1
来自谷歌的Linux 存储库页面:
添加Google的密钥,
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
然后从安装包铬网站,应添加文件“/etc/apt/sources.list.d/google-chrome.list”,其中包含以下内容,
### THIS FILE IS AUTOMATICALLY CONFIGURED ###
# You may comment out this entry, but any other modifications may be lost.
deb http://dl.google.com/linux/chrome/deb/ stable main
例如,安装来自 Google 的软件包应该只需为您自动配置您的sources.list。
答案2
一个新的错误刚刚出现。文件 etc/apt/sources.list.d/google-chrome.list 自动生成,这会破坏以前的版本以清除您的“[arch=amd64]”,因此 apt-get 会引发错误。看 https://www.reddit.com/r/chrome/comments/48oje6/linux_how_to_fix_failed_to_fetch/ 所以最初问题的答案是,目前没有完全有效的方法,但希望谷歌能够修复该错误。
答案3
@tux-drummer,很抱歉这么长时间才回答。并查看更多详细提示:
$ sudo echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> \
/etc/apt/sources.list.d/google.list
$ wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub >> google.pub
$ sudo apt-key add google.pub
OK
$ sudo apt-get update
...
Ign:1 http://dl.google.com/linux/chrome/deb stable InRelease
Get:2 http://dl.google.com/linux/chrome/deb stable Release [943 B]
...
$ apt-cache search google-chrome
google-chrome-beta - The web browser from Google
google-chrome-stable - The web browser from Google
google-chrome-unstable - The web browser from Google
$ sudo apt-get install --no-install-recommends google-chrome-stable
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
google-chrome-stable
0 upgraded, 1 newly installed, 0 to remove and 1 not upgraded.
Need to get 59.4 MB of archives.
Unpacking google-chrome-stable (76.0.3809.87-1) ...
Processing triggers for mime-support (3.60) ...
Processing triggers for menu (2.1.47+b1) ...
Processing triggers for man-db (2.7.6.1-2) ...
Setting up google-chrome-stable (76.0.3809.87-1) ...
...
@Inline,试试这个代码:
$ curl -I https://dl.google.com/linux/chrome/deb/dists/stable/Release \
2>/dev/null | grep -Ee "(^content-length|^HTTP)"
HTTP/2 200
content-length: 943
答案4
我也遇到了编辑消失的问题[arch=amd64]
。文件注释写着“自动配置”,但我不知道它是通过什么自动配置的。所以我戴上chattr +i
了google-chrome.list
。