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:
- 20 Linux System Monitoring Tools Every SysAdmin Should Know
- 20 Linux Server Hardening Security Tips
- My 10 UNIX Command Line Mistakes
- Linux: 20 Iptables Examples For New SysAdmins

- 25 PHP Security Best Practices For Sys Admins
- The Novice Guide To Buying A Linux Laptop
- 10 Greatest Open Source Software Of 2009
- Top 5 Email Client For Linux, Mac OS X, and Windows Users
- Top 20 OpenSSH Server Best Security Practices
- Top 10 Open Source Web-Based Project Management Software
- Top 5 Linux Video Editor Software
Facebook it - Tweet it - Print it -


{ 49 comments… read them below or add one }
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.
bt for installing command is sudo gainroot
Thanks..been looking for it.
I just double clicked the .deb package and let ubuntu do it all itself. Nice one.
“Clicking on .deb file” is much better advice, thanks
thank you so much. now i know “dpkg -i file.deb” alone would not work. cheers!
for openoffcie.org 3.0 :
in the directory of DEBS:
sudo dpkg -i *deb
it will install all the packages.
thnx a bunch
that worked, nice command. just put the package on the desktop, then run the terminal from there, worked just fine.
Hey thanx a ton!……………I had backed up a lot of packages, and wanted to install them all at once!………….:)
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.
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.
thanks. it’s a very useful info.
Thanks a lot! Very useful!
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”
Thanks a lot!!
hi,
How can i compile kernel modules (my programs).
thanks.
Helpful thanks.
Gracias, fue de gran ayuda, estoy instalando, ya te digocomo me fue :D
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 :(
Thanks, It really helped me out!
That did the trick, thanks!
-J
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
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!
from were i download .deb extension file
Download it from the Internet or the official ftp / mirror site. You can also use apt-get to install packages over the Internet.
I just tried using dpkg and it did not resolve dependencies for me.
I don’t understand why everyone is saying type this type that………..deb files only require you to double click and it will do it all by itself………oommmmmmmmmmmmm. no stress :-D
sir, thanks for your article.it is very helpful for me.
dpkg -i wvdial_1.60.1_amd64.deb execution results on ubuntu 9.10
dpkg: error processing wvdial (–install):
dependency problems – leaving unconfigured
Processing triggers for man-db …
Error were encountered while processing
Wvdial
i’m trying to install “sugarcrm ” on ubuntu10.04 but it is not possible.i want to install sugarcrm on any OS so plz help me
thanks – installing ubuntu server and needed to install webmin from a .deb file!
Oh, and for all of you wondering why we don’t “double click” on the file.
Download and install ubuntu SERVER – - – - – then try to double click! It ain’t got no GUI. So learn the command line or you will be lost!
Nice post! Short and to the point. Thank you!
Thanks a lot.
I want to know about downloadings and installation of images and software
i convert tar.gz or tar.bz2 to deb file with alien.
but after i install them, i cant find them in applications.
i try for installing wvdial in ubuntu 9.10.
i describe process as
1> i download all 5 packages.
2> dpkg –force-architecture -i pkg_name.deb
3> sudo apt-get install wvdial
i give some errors for /etc/apt/sources.lst for some hyperlinks.
what should ido?
i am very desperate to dial up pc with mobile.
plz help me
thanks!! it really helped me!
Hi. I am surprised that this install did not work successfully on my system (Linux Mint, though it says that it is Ubuntu 10.10 in the About Ubuntu section…).
Here is what was written in Terminal after the attempted installation:
tracey@tracey-TravelMate-5610:~$ cd /home/tracey/mysql-workbench-gpl-5.2.33b-1ubu1010-i386.deb
bash: cd: /home/tracey/mysql-workbench-gpl-5.2.33b-1ubu1010-i386.deb: Not a directory
tracey@tracey-TravelMate-5610:~$ cd /home/tracey
tracey@tracey-TravelMate-5610:~$ sudo dpkg -i mysql-workbench-gpl-5.2.33b-1ubu1010-i386.deb
[sudo] password for tracey:
Sorry, try again.
[sudo] password for tracey:
Selecting previously deselected package mysql-workbench-gpl.
(Reading database … 192967 files and directories currently installed.)
Unpacking mysql-workbench-gpl (from mysql-workbench-gpl-5.2.33b-1ubu1010-i386.deb) …
dpkg: dependency problems prevent configuration of mysql-workbench-gpl:
mysql-workbench-gpl depends on libzip1 (>= 0.8); however:
Package libzip1 is not installed.
mysql-workbench-gpl depends on mysql-client; however:
Package mysql-client is not installed.
mysql-workbench-gpl depends on python-pysqlite2; however:
Package python-pysqlite2 is not installed.
dpkg: error processing mysql-workbench-gpl (–install):
dependency problems – leaving unconfigured
Processing triggers for desktop-file-utils …
Processing triggers for python-gmenu …
Rebuilding /usr/share/applications/desktop.en_US.utf8.cache…
Processing triggers for python-support …
Errors were encountered while processing:
mysql-workbench-gpl
tracey@tracey-TravelMate-5610:~$
Any help and insight as to why there are errors would be greatly appreciated. Thank you!!
- Guy.
i have the same problem while installing emacs, can u help me out
hi, I am new to ubuntu
I did what this instructions said but it didn’t work, actually nothing happened, even if I double click on it it opens the programs of ubuntu, i don’t know what to do can you tell me what is wrong or what i should do
i used alien to convert .rpm to .deb ..whr does .deb file get stored..i m not getting it on desktop of ubuntu as my .rpm is on desktop
If you’re forced to use CLI, then there’s no way to double click. ;)
With GUI and only a couple .deb packets, it’s indeed easier to just double click.
thank you, i dont have gdebi so i had no ideea what to do
dpkg -i *.deb
dpkg: error: dpkg status database is locked by another process
i find this error.
Thanks a ton :)
This was exactly what i was missing.
where can i download packages to install on ubuntu using a pendrive
i am unable to install package for emacs on ubuntu 10.04 , i have saved the package on the desktop. any one can help me out..
i installed ubuntu 8.04.4 and was unable to connect to the wireless modem so i started manually updating packages, as i needed to run emacs, so i updated packages like, emacs22_22.2-0ubuntu9_i386,
emacs22-common_22.2-0ubuntu9_all,
liblockfile1_1.08-3ubuntu1_i386,
libgif4_4.1.6-9_i386,
libssl0.9.8_0.9.8k-7ubuntu8.6_i386,
libc6_2.11.1-0ubuntu7.7_i386,
libsqlite3-0_3.6.22-1_i386,
libdb4.8_4.8.24-1ubuntu1_i386,
libreadline6_6.1-1_i386,
emacs22-bin-common_22.2-0ubuntu9_i386,
emacsen-common_1.4.19ubuntu1_all,
libasound2_1.0.22-0ubuntu7_i386,
libpython2.6_2.6.5-1ubuntu6_i386,
xaw3dg_1.5+E-17build1_i386,
python2.6_2.6.5-1ubuntu6_i386,
python2.6-minimal_2.6.5-1ubuntu6_i386,
python-central_0.6.15ubuntu1_all.
these many packages were updated manually by the command , sudo dpkg -i ./filename.
on every package it showed on the terminal ” setting” and three package dependencies are broken that are , python2.6, emacs22, libreadline6.
plz help, i am new to ubuntu
People who receive errors, especially unresolved dependencies, may use the APT Package Manager.
If you have Ubuntu Desktop installed, you can use the Synaptic userinterface (for apt) for managing your packages. Syaptic will know all packages on the CD and may have configured additional web sources during installation. If not you can add new online sources anytime in the GUI. Synaptic will, as it uses APT, resolve all dependencies (or at least will try) during package installation.
if you want or have to use CLI and #sudo dpgk [] does not wortk, use the apt-get command (apt package manager) instead, which resolves all dependencies.
Install with APT on CLI:
A) to install known packages from known sources ;)
#sudo apt-get install [package]
If you want to install LOCAL deb packages with apt, do the following
B) define new sources and import packages
B.1) the location of the package must be included in the etc/apt/sources.list. you may change this file with an editor of your choice. If you want to add a directory, do the following:
B.1.1) put all debs in one directory, in this example /root/debs/
B.1.2) to create Packages.gz, in root type:
# dpkg-scanpackages debs /dev/null | gzip > debs/Packages.gz
B.1.3) edit sources.list adding this line:
deb file:/root debs/
B.2) you MUST use the following command after changing the sources.list, to import all new package lists from the sources:
#sudo apt-get update
B.3) now you can use A)
however, having internet connection available ist the easyest way to go.
to get the name of you package, try
#apt-cache search [expression]
that will list you all packages where [expression] was found ;)
for more Information on APT search google, or ask your WIKI.