13

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 ?

David Foerster
  • 36,890
  • 56
  • 97
  • 151
Asadullah Saim
  • 131
  • 1
  • 1
  • 3

8 Answers8

13

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

Jorge Castro
  • 73,717
notkevin
  • 731
8

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?

Flimm
  • 44,031
4

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
Chai T. Rex
  • 5,323
3

I use this to install google chrome on a remote server ... also works on your laptop

wget  https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo apt --fix-broken install
sudo dpkg -i google-chrome-stable_current_amd64.deb
dpkg -l | grep chrome

make sure run sudo apt --fix-broken install first before install with dpkg to ensure there's no error that come from broken dep

2

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?

0xC0000022L
  • 5,870
nbm
  • 613
2

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

-1

here is a solution which is worked for me,

sudo apt-get install python-pip python-dev build-essential

run the above command first and try to upgrade the packages

sudo pip install --upgrade pip  
sudo pip install --upgrade virtualenv

now you try installing chrome or anything as usual

muru
  • 207,228
uthay
  • 1
-1

Run:

sudo apt --fix-broken install

Then:

sudo dpkg -i google-chrome-stable_current_amd64.deb
Eliah Kagan
  • 119,640