Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I was told that sudo apt-get install (package.deb) installs the software with all the dependencies too.

I am trying install Google Chrome, but when I do this step, it generates the following error:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package google-chrome-stable_current_amd64.deb
E: Couldn't find any package by regex 'google-chrome-stable_current_amd64.deb'

Does anyone have a solution to this problem ?

share|improve this question
    
Google Chrome isn't in the repositories, so apt-get won't work. Run sudo dpkg -i google-chrome-stable_current_amd64.deb, and make sure that you are in the correct directory before executing the command. –  mikewhatever Feb 19 '13 at 21:48
1  
Having apt-get install a package with the .deb suffix tells apt that you are installing from a local file on your hard drive. If you want to install a package from a remote repository, then you need to specify the name of the package without the .deb part at the end. Additionally, Google Chrome is not available in the default Ubuntu repositories. Instead, the project that Google Chrome is based on, Chromium (which is virtually identical to Google Chrome), is included. To install it, run sudo apt-get install chromium-browser. –  InkBlend Feb 19 '13 at 22:08
1  
@InkBlend: good recommendation, because the update feature missing from Chromium gets compensated by package management. However, virtually identical is kind of a stretch. The embedded Flash is missing and that's a big deal for many folks. –  0xC0000022L Feb 21 '13 at 2:43
add comment

4 Answers

You will want to run sudo dpkg -i packagename.deb instead of apt-get.

share|improve this answer
    
This in case is a package you downloaded (like google-chrome). –  carnendil Feb 19 '13 at 21:48
add comment

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: Can you 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?

share|improve this answer
add comment

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:

Google Chrome ppp

share|improve this answer
add comment

All the other answers and comments should be helpful, but to be comprehensive:

  1. 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.
  2. 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?

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.