How To Extract ".deb" Packages in Fedora Core?

Have you ever wondered about the difference between automated installer (.exe file in Windows) and an archive?. The simple answer is, they're both actually archives!. Although there few more differences. For instance, in MS Windows whenever we install a software using a wizard (setup/installer) what it basically does is, it just extract the content into the predefined folder/path.

This is also what an archive does. But an installer goes further by adding registry entries (the "brain" of Windows OS) automatically which is something that an archive won't do. But still this resembles the close relationship between those two "extractors".

This is also true in GNU/Linux environment as well.

For instance, whenever you read a ".deb" (created by Debian team) or ".RPM" (created by RedHat team, not a "pure" archive as .deb, still it's kind of an archive) extensions using your archive manager in Gnome or Qt/KDE desktop, inside of these files you'll see a list of others files.

So, if you can manually put/extract these files using your archive manager to their defined locations, then it is the same thing as double clicking on them and installing.

Although not to say the truth that extracting a .deb or .rpm file with hundreds of other files in it... well it ain't fun for sure :P. So we should respect these extensions and worship... what the heck am I saying.. back to the story.

I'm better rpm!.... shut up deb! :)..
All I'm just saying is that (especially for the ones who are new to GNU/Linux... don't feel bad for yourselves, seriously, I'm not expert either!) since everybody knows that both .deb and .rpm are competing against each other, still, you should not think that extracting .deb files in GNU/Linux distributions that "love" RedHat "touch" such as Fedora Core will mean the end of your OS, you know crashing and stuff.

Since they're actually both archives (in a way), if you find a program that has been "packed" with the .deb extension, still, you can try reading it in a distribution that rely on the the .rpm format instead of .deb, you might even be able to run it (if you have it's dependencies installed, that is).

But in Fedora Core, by default, you cannot read .deb files. But fear not my friends, there is a separate program for that called ar. As said before .deb format actually is a pure archive format that uses "ar" as its "engine".

So all we gotta do to extract .deb files in GNU/Linux distributions that uses .rpm by default is to install our little "ar" friend. "ar" actually come as a part of the GNU Binutils package (a pack which contains few programmer's tool)

In Fedora Core 15 or latter versions, open your Terminal and enter the below command to install "binutils".
su -c "yum install binutils"
So, whenever you download a .deb package in FC, etc open your Terminal and use the below command to extract the content.
ar p mypackage.deb data.tar.gz | tar zx 
Then you can begin the painful process of manually copying the content to its location/s :). Hope this helped.

No comments:

Post a Comment