Ubuntu Linux: How do I install .deb packages?

by Vivek Gite · 24 comments

Q. I am a new Ubuntu Linux use. I need to install a package called package.deb. I know I can use Synaptic package management to install packages from CD or Internet. But I want to install this special .deb file. So how can I install package?

A. You need to use dpkg package manager from shell/command prompt. dpkg is a tool to install, build, remove and manage packages. dpkg itself is controlled entirely via command line parameters. For example -i use to install .deb file.

How do I install .deb file?

To install package called package.deb type the following command:
Go to directory where package.deb is kept. For example if it is in /tmp directory:
$ cd /tmp
Type the following command:
$ sudo dpkg -i package.deb

Featured Articles:

Want to read Linux tips and tricks, but don't have time to check our blog everyday? Subscribe to our daily email newsletter to make sure you don't miss a single tip/tricks. Subscribe to our weekly newsletter here!

{ 24 comments… read them below or add one }

1 Gams 11.06.07 at 7:23 am

Thanks a bunch. I was searching for hours for that solution…

sudo dpkg -i package.deb

I had a directory of backed up .deb files that I had to restore.

Cheers,

Gama.

2 Ahmad 06.17.08 at 7:54 am

Thanks..been looking for it.

3 Adrian 06.26.08 at 4:15 pm

I just double clicked the .deb package and let ubuntu do it all itself. Nice one.

4 MegaS 10.23.08 at 1:20 pm

“Clicking on .deb file” is much better advice, thanks

5 Ray 10.26.08 at 11:13 pm

thank you so much. now i know “dpkg -i file.deb” alone would not work. cheers!

6 unknown 10.30.08 at 5:22 pm

for openoffcie.org 3.0 :

in the directory of DEBS:
sudo dpkg -i *deb

it will install all the packages.

thnx a bunch

7 Ritz 11.07.08 at 3:09 pm

Hey thanx a ton!……………I had backed up a lot of packages, and wanted to install them all at once!………….:)

8 Eivind Trana 11.10.08 at 9:00 am

Hi there.
Thanks for the tips ’bout .deb install.

Next (a bit out of focus, but nevertheless):
I am totally new to Ubuntu. Installed it because of a disk failure on my laptop. When wanting to install windows for boot on my spare USB-drive, Windows (bulls*%& MS) couldn’t do it (blue screen). Frustrated I booted the Ubuntu 8.0.4 CD-ROM I had downloaded a while ago. Ubuntu found the disk like nothing! Halleluya!!!
So now I am able to still use my good old laptop! And it is MUCH more faster than under Windows.
Finding a new HD to a 5 years old Dell Inspiron isn’t easy. I might as well retired my current Inspiron 500m as a kinda homebrewed webserver and buy one of those snaksy new minis, like EEEPC or Dell Inspiron Mini 9, but INCLUDED with Ubuntu of course. Good bye Windows.

BTW:I have never before found such a happy bunch of contributors/helpers/goodminded persons as I have in the Linux-world! A general thanks to all’ye for yer help during the transition.

BTW2: My first “PC” was a Metric ABC80 w/16Kb RAM (bought in 1978). OMG the world has changed since then :-)

From now on: straight into Ubuntu-heaven!
Cheers mates!

Kindly sunshine from

Mr. Eivind Trana
Old IT-guy (30 years experience) from Norway living retired cool days in Lapu-Lapu, The Philippines.

9 xenomorf 03.29.09 at 8:26 am

wooo… thx a lot. i’ve been wondering how do i install DEB packages. i want to install this WINE packages but all i see is to connect to the internet first. But i can’t go online because i dont know how to install my wireless card. so, i juz download this DEB manually and install it.

thank you very much.

10 mugalata 04.11.09 at 9:11 am

thanks. it’s a very useful info.

11 Leo 04.16.09 at 6:29 am

Thanks a lot! Very useful!

12 Jordan 05.15.09 at 5:43 pm

Sometimes installing the deb file through the GUI won’t work. If you have a i386 package and you’re running amd64 you need to use dpkg like so:

“dpkg -i –force-architecture /path/to/file.deb”

13 Thana 06.11.09 at 1:04 pm

Thanks a lot!!

14 Mostafa 08.24.09 at 10:14 pm

hi,
How can i compile kernel modules (my programs).
thanks.

15 Jason 09.12.09 at 11:58 am

Helpful thanks.

16 matias 09.17.09 at 5:57 pm

Gracias, fue de gran ayuda, estoy instalando, ya te digocomo me fue :D

17 matias 09.17.09 at 6:00 pm

ya instale el vmware, pero donde quedo la instalacion?

esto me aparece:

root@matias1:/home/matias/programas# dpkg -i vmware-player_2.5.3-185405_i386.deb
(Leyendo la base de datos …
170294 ficheros y directorios instalados actualmente.)
Preparando para reemplazar vmware-player 2.5.3-185405 (usando vmware-player_2.5.3-185405_i386.deb) …
Desempaquetando el reemplazo de vmware-player …
Configurando vmware-player (2.5.3-185405) …
root@matias1:/home/matias/programas#

pero no logro encontrar la instalacion por ningun lado :(

18 oh2fpg 09.28.09 at 12:37 pm

Thanks, It really helped me out!

19 Jeff 10.05.09 at 8:29 pm

That did the trick, thanks!
-J

20 alex 12.09.09 at 2:57 am

mine keeps showing this and i dont know what to do

You must agree to the above LICENSE to install this software. Do you agree? (yes/[no]) yes
Unpacking replacement sn9cxxx …
WARNING: -e needs -E or -Fdpkg: dependency problems prevent configuration of sn9cxxx:
sn9cxxx depends on linux-image-generic (= 2.6.20.16.28.1); however:
Version of linux-image-generic on system is 2.6.31.16.29.
dpkg: error processing sn9cxxx (–install):
dependency problems – leaving unconfigured
Errors were encountered while processing:
sn9cxxx

21 Sheldon 12.11.09 at 6:18 pm

Please Help I’m new to Ubuntu and trying follow the instructions and this is what I keep getting:

sheldon@ubuntu:~$ cd /tmp
sheldon@ubuntu:/tmp$ sudo dpkg -i package.deb
tar: ./postinst: time stamp 2009-12-10 22:16:45 is 72110.366117579 s in the future
tar: ./postinst~: time stamp 2009-12-10 22:14:11 is 71956.365517782 s in the future
tar: ./control~: time stamp 2009-12-10 22:14:59 is 72004.365354354 s in the future
tar: ./control: time stamp 2009-12-10 22:15:03 is 72008.365204055 s in the future
tar: .: time stamp 2009-12-10 22:16:45 is 72110.364497541 s in the future
(Reading database … 114110 files and directories currently installed.)
Preparing to replace astronaut-wv-server-beta 0.9-2 (using package.deb) …
Unpacking replacement astronaut-wv-server-beta …
dpkg: dependency problems prevent configuration of astronaut-wv-server-beta:
astronaut-wv-server-beta depends on openssh-server; however:
Package openssh-server is not installed.
astronaut-wv-server-beta depends on xinetd; however:
Package xinetd is not installed.
astronaut-wv-server-beta depends on apache2; however:
Package apache2 is not installed.
astronaut-wv-server-beta depends on apache2-suexec; however:
Package apache2-suexec is not installed.
dpkg: error processing astronaut-wv-server-beta (–install):
dependency problems – leaving unconfigured
Errors were encountered while processing:
astronaut-wv-server-beta

Please Help!

22 vinod 12.12.09 at 3:47 pm

from were i download .deb extension file

23 Vivek Gite 12.13.09 at 8:46 am

Download it from the Internet or the official ftp / mirror site. You can also use apt-get to install packages over the Internet.

24 todd 02.27.10 at 2:56 am

I just tried using dpkg and it did not resolve dependencies for me.

Leave a Comment

You can use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Previous FAQ:

Next FAQ:

nixCraft FAQ PDF Collection Now Available To All