Skip to content
Sun, Nov 27 2005
Tweet

HOWTO: Use dpkg to Install .deb Files.

I’ve written about using apt-get to get and install debian packages. However, a recent comment by a reader brought the fact that I hadn’t written anything on what to do with a .deb file that exists on your system already either by download or other media.

Using the apt-get application is the quickest way to find and install debian packages. The installation part is done by an application named dpkg. Dpkg doesn’t have to be used by apt-get, you can use it manually as well.

From the man dpkg command:

dpkg – a medium-level package manager for Debian

Whatever that means.

In keeping with GNU/Linux system security, only the superuser can use the dpkg application. Dpkg is a typical GNU/Linux application that is controlled by command-line switches. Possibly the most common use of dpkg is to install a local .deb file.

To install a .deb file, become root and use the command:

dpkg -i filename.deb

Dpkg can also be used to:

  • dpkg –unpack: unpacks the file but does not install it
  • dpkg –configure: presents whatever configuration options are available for the package
  • dpkg –remove: removes a package

Some of the package manipulation commands are actually carried out by an application called dpkg-deb. In those cases, dpkg just acts as a front end to dpkg-deb and passes the commands to it.

Dpkg-deb can also be used to manipulate .deb files. Some of the more useful commands of dpkg-deb are:

dpkg-deb –show filename.deb

This will display the information for filename.deb. Normally, this is boring information like the application version (which is normally evident from the filename), but in some cases more interesting and useful information is displayed.

Consult the dpkg man page for information on the more arcane uses for dpkg.

Around The Web
Loading...
Share This Post:
  • Digg
  • Facebook
  • StumbleUpon
  • Tumblr
Tweet
Pin It
Technology
  • SamHoratio

    Go to the directory where the packages are and type:

    sudo dpkg -i *.deb

    This might work. It does install all the .deb packages in the directory but I’m not sure exactly how it handles dependencies.

  • herakles

    @bramgn

    well done
    thank u

  • Jane

    When trying to install two deb files “Broken dependencies” is displayed on package installer . Someone can help me.

  • Brinjal

    It should be:
    dpkg-deb –show filename.deb

  • https://beam.to/ooberules Bill

    wow for over a week i have been trying to figure out how to get flash to work thanks to this page i found out how to install the install_flash_player_10_linux.deb since the apt-get install flashplugin-nonfree didnt work but this page was alot of help

  • haris

    Hey there.
    Thanks for this fine instruction!

  • SPENCE

    For the time being I am going to have to run my Ubuntu off line. No etherhet I/O.

    I need URLS for download sites for ,deb files.

    What directory should I copy the downloaded files to for installation.

    Then I need install procedures.

  • https://eurion.net RainCT

    You can also use “gdebi” (or it’s graphical interface, “gdebi-gtk”), which will install any missing dependencies.

  • Thomas

    Thank you for the easy to understand explanation of how to install a .deb file.

  • Pingback: Just Another Blog » Blog Archive » Lidt om pakker, download og install

  • CrazyGangster

    Hii everyone

    I try install Virtual Box in Damn Small, it’s possible?
    Thanks

  • Pingback: Metal Shaper Man’s Blog

  • Carlos Jones

    I had some troubles installing Asterisk on ubuntu and needed to install libncurses5-dev, this post helped me to solve the situation. Thanks a lot.

  • Luis

    I have two .deb files. When I try to install them they ask for a dependency, but package 1 needs package 2 and vice versa. I thought I could install them together but I dont know how to do it, can someone help me? Thank you.

  • O2O

    I’ve just used Ubuntu. So It’s too difficult.
    When i type: sudo apt-get install -f
    —>
    o2o@o2o-desktop:/root$ sudo apt-get install -f
    E: Could not get lock /var/lib/dpkg/lock – open (11 Resource temporarily unavailable)
    E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?
    So, can you help me fix it?
    Thanks!!!

  • naveen

    hi,
    can you say about how dpkg would build the dependence tree before installing a package.

  • Ravi Kant

    What is the problem and how could it be sorted out.
    kindly reply at

  • Ravi Kant

    hi

    Well I am trying to install qt package for Debian kernel 2.6

    I downloded qt3-designer_3.3.4-3sarge3_i386.dep package

    while using command
    apt-get install qt3-designer_3.3.4-3sarge3_i386.dep
    The message displayed is
    Reading package lists… Done
    Building dependency tree… Done
    E: Couldn’t find package qt3-designer_3.3.4-3sarge3_i386.dep

    After trying with command dpkg -i qt3-designer_3.3.4-3sarge3_i386.dep

    (Reading Database …. 66812 files and directories currently nstalled)
    Preparing to replace qt3-designer 3:3.3.4-3sarge3 (using qt3-designer_3.3.4-3sarge3_i386.dep ) …
    Unpacking replacement qt3-designer …
    dpkg-dep: subprocess paste killed by signal (Broken pipe)
    dpkg: error processing qt3-designer_3.3.4-3sarge3_i386.dep (–install):
    returned error exit status 2
    Errors were encountered while processing
    qt3-designer_3.3.4-3sarge3_i386.dep

  • https://www.myspace.com/gutsygibbon mustakim

    how to install many deb in one command? I don’t need aptoncd, I just want to learning how to install over 50 units of deb in one command in terminal. sudo dpkg -i package.deb just only install one by one. Any ideas?

  • naveen

    just can you say something deep about how dpkg will prepare and what are all the steps that it would perform before and after installation of an .deb files.