Converting deb files in Ubuntu

January 3, 2007

in How to, Linux/Ubuntu

Different Linux distributions package up software in different ways. RedHat uses .rpm files, while Debian and Ubuntu use .deb files. To convert a .rpm to a .deb file, you can use the alien program:

alien -k package.rpm

The -k option preserves the minor version number of a package (don’t worry about it, just do it or read the man page).

Installing a package in Debian or Ubuntu is also easy. To install a .deb file, you can type:

sudo dpkg -i packagename.deb

To uninstall a package, use

sudo dpkg -r packagename

{ 12 comments… read them below or add one }

Christer Edwards January 3, 2007 at 8:41 pm

I should add that alien works on a good ‘ol “college try” and doesn’t always work smoothly. It is definitely worth a shot though before you try compiling from source. The good thing is that Ubuntu has a HUGE package repository so in most cases you can get the package you need.

Aaron Pratt January 3, 2007 at 9:14 pm

Great info., can we get access to the “1750+ little files” now Matt?

Thanks ;)

Matt Cutts January 3, 2007 at 10:31 pm

Aaron, I’d have to check each one to see if it was confidential or not, which sounds like a tiny little microcosm of hell to me. :) But I may review the directory to see if I can cherry pick a few of the good ones.

Oh. I wonder if I can get usage stats to see which files are accessed the most? Hmm…

Milan Kryl January 4, 2007 at 2:39 am

2 Matt> may be you can try this simple howto:

grep -L –recursive “google” *

:-)

Manca January 4, 2007 at 7:37 pm

Hey Matt,
You forgot about .tgz packages that Slack uses :)

rpm2tgz will do the trick.

Laterss

Andrew Nevelos January 9, 2007 at 10:52 am

Have you ever used Ubuntu on a laptop? I am thinking about moving my Sony Viao over and wanted to know if I was in for a bunch of headaches.

Aukcje January 19, 2007 at 2:42 pm

Very good article … Can I translate this article and insert on my site in Poland? … Thanks :)

Paul January 22, 2007 at 4:15 pm

Ubuntu on my Sony Vaio works a treat, its a A115B. No problems to report yet, it has been on for about 6 month. It also hibernates without spending days playing about with the kernel!!

AG March 5, 2007 at 12:41 pm

Actually, you really don’t need ‘alien’.
It is possible to extract the contents of a .deb file by using ‘ar’:
For instance..

$ ar t libstdc++6_4.1-0exp6_i386.deb
debian-binary
control.tar.gz
data.tar.gz

The file metadata is contained in control.tar.gz.
Important bits are found in data.tar.gz (it’s contents can be copied to /.)

Common commands:
ar t
Display table of contents for the archive.

ar x
Extract archive member from the specified ar file.

ar p
Print the archive member to stdout from the specified ar file.

Ars July 26, 2007 at 10:39 am

lol, and I torture myself a year ago with those things for about one week.

C Phillips February 9, 2008 at 3:15 am

I have found “GDebi package installer” to be easier than opening a terminal. Also, when installing Debs I just simply click to download, then “choose open with”-and scroll down to “GDeb” in the download options. I find that if there are further un-met dependencies it will prompt me to install them too. This way I usually get all the dependencies met also. Try it. It’s easy

sohbet December 11, 2009 at 7:56 am

thnxxx

Leave a Comment

If you have a question about your site specifically or a general question about search, your best bet is to post in our Webmaster Help Forum linked from http://google.com/webmasters

If you comment, please use your personal name, not your business name. Business names can sound salesy or spammy, and I would like to try people leaving their actual name instead.

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 post:

Next post: