203

I am trying to install chrome browser via command line. I tried this:

$ apt-cache search chrome browser

The results show that the proper term is "chrome-browser," so I tried that:

$ sudo apt-get install chrome-browser

And then "Y" for the Y/n question.

But the installation threw errors. Does someone see anything wrong with the commands I issued?

0

7 Answers 7

286

Google Chrome is not in the repositories because it is proprietary, however Chromium(the open source platform Chrome is built upon) is.

These are the instructions to install Chrome on a 64 bit Linux distribution as that architecture is the only one Chrome supports.

To install Google Chrome, run the following:

sudo apt-get install libxss1 libappindicator1 libindicator7
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo apt install ./google-chrome*.deb

Installed this way, the package has the name google-chrome-stable.

If error messages pop up after running the command sudo apt install ./google-chrome*.deb then run the command

sudo apt-get install -f
15
  • 3
    uname -i gave me x86_64 but it would seem I needed it to output amd64 instead.
    – altendky
    Aug 21, 2013 at 0:07
  • 1
    I get this an ERROR 404 with these instructions. I installed using @David E. Moore instructions listed below. Not sure if adding the libxss1 helped with Mr Moore's instruction or not but I did do that before. This was on a fresh install on 13.10 Unity amd64 install.
    – lqlarry
    Oct 19, 2013 at 18:28
  • 2
    What is the package libxss1 for? Is this still a requirement? Oct 30, 2013 at 11:08
  • 1
    I also had to install xdg-utils with sudo apt-get install xdg-utils
    – Juampy NR
    Nov 28, 2013 at 12:19
  • 1
    @reggie done! :)
    – jrg
    Jul 9, 2016 at 10:58
109

As per http://www.ubuntuupdates.org/ppa/google_chrome

wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add - 
sudo sh -c 'echo "deb https://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list'
sudo apt-get update
sudo apt-get install google-chrome-stable
6
  • 1
    Finally, this works on ix86 systems, thakns
    – radtek
    Nov 21, 2014 at 1:38
  • 3
    This is a great answer to get the standard Google Chrome.
    – Mythul
    Mar 20, 2015 at 20:01
  • 5
    This should be the accepted answer since it also pulls dependencies. May 17, 2018 at 17:31
  • 1
    after following the steps, when i run the command sudo apt-get install google-chrome-stable, "Unable to locate package google-chrome-stable" Oct 4, 2018 at 3:45
  • Perhaps you are using a 32-bit Ubuntu when only 64-bit is supported now, as suggested by askubuntu.com/a/853130/28107. Oct 5, 2018 at 14:04
58

If you really want to install Chrome (not Chromium) using apt-get it's possible as explained here:

  • Add google repository to your sources, that is, create a new file under /etc/apt/sources.list.d with the following contents:

    deb http://dl.google.com/linux/chrome/deb/ stable main
    
  • Get repository key:

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

    sudo apt-get update 
    
  • And install the package:

    sudo apt-get install google-chrome-stable
    

Note: instead of google-chrome-stable you can also install either google-chrome-beta or google-chrome-unstable packages from the same repository.

9
  • 1
    You said "create a new file under...", but what should I name that file?
    – user33877
    Nov 14, 2011 at 20:47
  • 2
    Well, the problem with this is that when you install Chrome, in theory it'll break, because Chrome's postinstall script does this for you... :)
    – jrg
    Nov 14, 2011 at 20:53
  • 1
    I'd say that the name of the file isn't really important (not sure about the extension though). I'd name it google.list, but it could be chrome.list or some other random name not being already used.
    – jcollado
    Nov 14, 2011 at 20:55
  • @jrg I decided to give it a try and what I found is that indeed Chrome packaging scripts add a new file under /etc/apt/sources.list.d. The result of this is that Chrome installation didn't fail, but apt-get update now prints a "duplicate sources.list entry" warning; so, yes, this method shouldn't be used unless you want to fix the sources files later.
    – jcollado
    Nov 14, 2011 at 21:49
  • 6
    Here are the relevant instructions on the Google PPA page. Some of the details are now a bit different and so the above answer should be updated accordingly. May 17, 2012 at 23:48
24

If you are running a 64 Bit system, then use this:

wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb

then:

sudo dpkg -i ./google-chrome*.deb

and to finish:

sudo apt-get install -f

This is the same as jrg's reply, but you change the i386.deb to amd64.deb.

EDIT: The past couple of times I have not had to do the install -f. It seems to have all needed after installing.

Good Luck!!

4
  • Jorge added this to the accepted answer above. I guess I should of thought of that. Makes the answer more complete now.
    – lqlarry
    Nov 20, 2011 at 3:12
  • Is the line sudo apt-get install -f really necessary? Oct 30, 2013 at 11:27
  • 1
    I think my answer is outdated. I've used the answer above mine (at this time) by @Dale E. Moore and had successful installs.
    – lqlarry
    Nov 4, 2013 at 3:19
  • Your answer is not outdated. The google-chrome-stable_current_amd64.deb will remain current (by its namesake) as long as it's being maintained and updated by Google. On rare occasions, just like any manual install, you might have to use the install -f option. But as of Ubuntu 18.04, it installs the absolute latest Chrome update and configures it to be automatically flagged for regular updates when they are available. The two commands are the cleanest and easiest method of a fresh install of Google Chrome. Jun 16, 2018 at 8:53
9
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add - 
sudo sh -c 'echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list'
sudo apt-get update 
sudo apt-get install google-chrome-stable 

that's correct code for ubuntu :)

6

If you want the official Google Chrome build, you have to download it from here: Download Google Chrome.

I believe only Chromium is in the repository.

-6

If you want Google Chrome, just search it in google. If you want Chromium add this ppa:

sudo add-apt-repository ppa:chromium-daily/stable
sudo apt-get update
sudo apt-get install chromium-browser

And that's it. Enjoy your browser.

2
  • 8
    -1, daily builds aren't recommended for anyone other than developers. THIS IS DANGEROUS.
    – jrg
    Nov 14, 2011 at 20:43
  • 2
    What PPA should be added? If you cannot answer this question now you can delete your answer, and gain back 2 rep.
    – nanofarad
    Oct 3, 2012 at 20:45

You must log in to answer this question.