sudo apt-get install (google-chrome-stable_current_amd64.deb) is not working
You will want to run sudo dpkg -i packagename.deb
instead of apt-get.
You can install .deb
files with the Ubuntu Software Centre by double-clicking on one, or using dpkg -i packagename.deb
command. See this question: How do I install a .deb file via the command line?
sudo dpkg -i google-chrome-stable_current_amd64.deb
apt-get
is used to install packages that exist in Ubuntu's repositories. You can explore the packages in Ubuntu's repositories by opening the Ubuntu Software Centre, or Synaptic. Ubuntu's repositories include thousands of applications, but there are still quite a few that aren't included, like Google Chrome. (Chromium, however, is included in Ubuntu's repositories).
The beauty of using Ubuntu's repositories is that finding the package, downloading the package, and installing updates for the package is handled for you. For example, you only need to type the following command to install Chromium, you don't have to download anything in advance or anything else:
sudo apt-get install chromium-browser
For a comparison of the different ways of obtaining and installing software in Ubuntu, see this question: Should I install programs from a source tarball (`.tar.gz`), from the Ubuntu Software Centre, or from elsewhere?
You need a ./
in front of the .deb
filename (or the full path if it's not in the current directory):
sudo apt-get install ./google-chrome-stable_current_amd64.deb
All the other answers and comments should be helpful, but to be comprehensive:
- No, whoever told you that was wrong. Installing the .deb package might install Chrome with all required dependencies, depending on what's included in the particular package you have and what dependencies you need. Or it might not, depending.
- Just to be clear, you do need to have actually downloaded the Google chrome software first. As mentioned, it is not automatically included in the repositories; you have to manually download it to your machine. I like the command line too and it is possible to do this from the terminal, but since you're about to click into a web browser anyways, if you google "google chrome" from Firefox, which is included with ubuntu, Google Inc. will give you a lot of help in downloading and installing their product. If you want the branded version, that is. [1]
Once you have downloaded the package from Google and run it to install, only then will you - potentially - be given an error message that you need to install dependencies.
You would then want to run
sudo apt-get install libnspr4-0d
sudo apt-get install libcurl3
Which - I think - are the most common missing dependencies required by Chrome (in 12.04 that is- YMMV.) And then you can use, as mikewhatever notes, from the directory in which your Chrome installer is located, the command
sudo dpkg -i [googlechromepackagename.deb]
Where that stuff in brackets should be what you downloaded from Google.
But you're only using sudo dpkg -i because you're already in the command line anyways. You could just go back and double-click or however you run the installer file from your GUI.
If that still doesn't work and you are still missing required dependencies,
sudo apt-get install -f
tells ubuntu to try to fix broken packages, then you can run the sudo dpkg...
command again.
[1] I would reiterate that while askubuntu is an extraordinary community resource, if what you really want is to put Google's proprietary, branded version of their software on your machine, and all that entails, your best bet is probably going to be going to Google for help. I mean they're not working as volunteers, you know?
I install Google Chrome by visiting dl.google.com with another browser and just following instructions.
The installation process automatically adds a ppa for subsequent updates. See the last entry in the image below: