How can I install a .deb file from command line? [duplicate]

I am running 13.04 and in terminal I am trying to install guitar pro 6 for linux as it will not install with Ubuntu software center. I am in the correct directory and if I ls the directory, I get GP6.deb which is the folder I downloaded guitarpro6 to, but when I use apt-get install GP6.deb Terminal accepts the command but says it cannot locate the file.

Am I using the correct command or must I do something else first?


Solution 1:

.deb files are installed using the dpkg command. So use the following command:

sudo dpkg -i GP6.deb
  • -i tells dpkg to install

If it gives you errors about other packages/dependencies, run the following to fix it:

sudo apt-get install -f
  • -f tells apt-get to fix missing dependencies