7

I need to install google-chrome on debian stable. Is there any way I can add the google's repos and have always the recent version of chrome installed?

4 Answers 4

8

From Google's Linux Repostory Page:

Add Google's key,

wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -

Then install package from the chrome site, which should add the file '/etc/apt/sources.list.d/google-chrome.list' that will contain the following,

### 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

E.g., installing the package from Google should just auto-configure your sources.list for you.

3
  • I don't have a browser currently installed and it won't download through links. I just need to add the google repo stuff to my repos and apt-get update and then install the package. Commented Nov 1, 2012 at 13:17
  • IMO worth noting that you can also get their key off a keyserver instead, ie: apt-key adv --keyserver ha.pool.sks-keyservers.net --recv-keys A040830F7FAC5991
    – tianon
    Commented Jan 26, 2016 at 23:58
  • 2
    https://dl.google.com/linux/chrome/deb/ returns 404 for me
    – Inline
    Commented Aug 7, 2017 at 7:31
2

A new bug has just arisen with this. The file etc/apt/sources.list.d/google-chrome.list automatically gets generated and this clobbers the previous version to wipe out your '[arch=amd64]' so then apt-get raises an error. See https://www.reddit.com/r/chrome/comments/48oje6/linux_how_to_fix_failed_to_fetch/ So the answer to the original question is that there is no fully working method at present but hopefully Google will fix the bug.

2

@tux-drummer, sorry for a long time to answer. And see more detail hints:

$ 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, try this code:

$ 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
0

I am also experiencing the problem of the disappearing edit [arch=amd64] vanishes. File comments read "automatically configured", but I don't know by what it is automatically configured. So I put a chattr +i on google-chrome.list.

1
  • The disappearing edit .. vanishes. Does that mean it reappears?
    – Anthon
    Commented Mar 6, 2016 at 15:57

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .