Skip to content
Fri, Sep 30 2005

HOWTO: Install *.deb *.rpm and Source Code Files.

In a very broad sense, GNU/Linux applications are distributed in two formats: source code and distribution-specific packages.

See Primer on Programming post.

The concept of distributing an application as source code seems foreign to many computer users, but it is extremely logical.

It is usually preferable to find a distribution specific package of the application for your distribution first. Only hunt for source code if you have a reason to such as there is no package for your distro, or the source code version is more up to date than the package version.

Distribution Specific Packages

Possibly the two most common packages out there are Debian and Red Hat style packages. There are others such as Slackware, but Debian and Red Hat are probably the most common.

Debian style packages end in the extension .deb and Red Hat style packages end in the extension .rpm. In general, if you are running a Debian-based system (like Ubuntu, Kanotix, or Debian itself) you should look for a *.deb package for the application; if you’re running a Red Hat-style system (like Fedora, SUSE, or Red Hat itself), then you should look for a *.rpm package for the application.

The words ‘In general’ are emphasized above because some distributions have gone so far off the mainstream track of their flavour that this rule does no apply. For example, Ubuntu is a Debian-based distribution and therefore you should be able to use a *.deb package to install an application. However, Ubuntu has strayed so far from the core Debian stream that there are some *.deb packages that won’t work on Ubuntu. Therefore not only do you want to look for a *.deb package for your Ubuntu but you also want to look specifically for an Ubuntu *.deb package. Attempting to install a standard *.deb package may or may not work.

I am not picking on Ubuntu – this same situation exists for many distros.

You may also have some luck grabbing the proper *.deb or *.rpm from your package manager.

In the terminal window of a Debian-based system (as root), type:

apt-get install application_name

In the terminal window of a Red Hat-based system (as root), type:

yum install application_name

If you’re successful, the application will download and install itself and you’re done.

Source Code

Source code is generally distributed as a tar archive which is usually referred to as a ‘tarball’. The advantage of compiling source code over installing a package is that the application will be built to your specific system. The disadvantage is that your system may not have all of the dependent packages that it requires in order to actually install or run the application. The activity of trying to install any required dependencies for an application is sometimes referred to as ‘dependency hell’ because it can be quite labourious.

Tarballs are generally archived in one of two ways: BZipped (usually has an extension of tar.bz or .tbz) or GZipped (usually has an extension of either .tar.gz or .tgz)

In general, the following steps are used to install a tarball:

  1. For a GZipped tarball: tar –zxvf filename.tar.gz (or filename.tgz)
  2. For a BZipped tarball: tar jzvf filename.tar.bz (or filename.tbz)
  3. ./configure
  4. make
  5. (as root) make install

The configure stage is where your system is queried to see if it has all the dependent files. The make stage is where the executable is actually compiled, and the make install stage is when the completed application is installed onto your system. Generally if you make it past the configure then you’re probably going to be OK.

Around The Web
Share This Post:
  • Digg
  • email
  • Facebook
  • StumbleUpon
  • Tumblr
Technology

Comments

  1. Trackback
    1103 days ago
    Install Paket2 .deb .rpm .tgz .tbz…. « Ngeblog Dulu Ah

    [...] Paket2 .deb .rpm .tgz .tbz…. Untuk install paket2 sofwtare, merujuk dari sini, bisa [...]

  2. By Clair Ching

    For those who want to install .deb files and are using Ubuntu 8.10, you could click on the .deb file and it will be installed for you. :) Otherwise go to the terminal and use the dpkg command. How does it work? It’s easy if you’re already on the path of the file. If you downloaded your .deb file in /home/username then on the command line make sure that you are there. The command to check where you are is pwd. The run the command “dpkg -i filename.deb” :) Remove the “” when you run the command.

    @Dutch
    There are graphical interfaces for installing and stuff. :) But it doesn’t hurt to teach others how to use these commands either.

  3. By Rinez Thapa

    Hello,
    if anyone could help me giving any information; How to install the file having .deb extension? I want to install virtual box in my OS. I am using vista. The file i downloaded has .deb extension but i could not proceed it anyway. .rar extension file is installed by winrar program. .deb extension file is installed by —————– ???????????????? reply to my mail as soon as possible!!! it would be a great help.

  4. By Dutch

    Wow, type in all these cryptic commands and magic happens.

    how does one find out what the hell all these commands are, is there some sort of dictionary?

    This is really frustrating for someone who just wants to install applications so he can get to work on this “wonderful” operating system. The level of frustration involved in simply getting applications into place is phenomenal.

    Until Linux gets past this stage and into “1 click install” territory it is destined to remain a fringe OS. Great playground for geeks and developers to tinker with but a nightmare for people who “just want to get to work”.

  5. By MUKESH PATIDAR

    hwo can i install deb file pls reply soon

  6. By ankit

    HI.. Experts..
    I am facing problem with my RHEL5.0. i installed it in my DELL A-840 but the drivers are not installed. i made yum server and installed GNOME,KDA. i removed Xorg.conf and restart the services of display. but still my graphics are not coming. my lan card is nt wrking.
    i am having drivers but its asking lots of dependency. and many files are having .deb extention.
    Pls do something and send me a solution i am very much tired.
    Thnx friends..

  7. By Anand

    How can i install .deb package in fedora 9

  8. By Jon

    It’s not a matter of whether or not portage is better. It’s the fact that portage is specifically the Gentoo package manager. He’s not saying that Debian or RPM users should use Portage as that is not possible. He is saying that everyone should use Gentoo. And that is just plain old elitist crap.

  9. By Clair

    @tsolox I don’t think everyone’s too pitiful. Others would disagree with you for certain reasons. Maybe you could have said WHY.
    @Jon Chill.

  10. By Jon

    Spoken like a true Gentoo elitist. Why would a Gentoo user even be on a New Linux User site? Did Gentoo beat you up and steal your lunch money?

  11. By tsolox

    you are ALL pitiful to read… Portage is the way.

  12. By Wilfredo

    Really Good Reading….

  13. Trackback
    1453 days ago
    Adware articles » Blog Archive » Wajig

    [...] HOWTO: Install *.deb *.rpm and Source Code Files. New Linux User » HOWTO: Use dpkg to Install .deb Files. Nov 27, 2005 at 9:30 am. […] I’ve written about using apt-get to get and install debian packages. Tags: thoughts [...]

  14. By satya

    how to install MS OFFICE2003 IN REDHAT 5????
    OR
    HOW TO INSTALL THE OPENOFFICE.ORG.EXE IN REDHAT5??
    PLEASE REPLY SOON.

  15. By Jess

    Brilliant! Goodness, I can actually understand this!

    Thank you!

  16. By Anish Ganguly

    I don’t know how to install *.deb packages on Ubuntu.Please notify me at my e-mail id about the installation process and commands.

  17. By yogesh

    help to download and install wine on RHEL4.0

  18. By lex

    , … how to configr. -madwifi- ?