[Preston] installation of rpm packages on a debian system

Andrew King preston at mailman.lug.org.uk
Sat Feb 8 01:09:01 2003


Hi there Jim,

Jim Skelton wrote:
> I am contemplating switching to Debian but having been indoctrinated into the 
> red hat culture want the best of both worlds
> 
> can you get a debian packaged rpm programme and then use that to install and 
> build rpm packages?
> 
> What is the availabitlity of debian packages? are they as widely available as 
> rpm

They're better; they're really good. A lot of people switch from Red Hat 
to Debian just because of the package management system.

Like Red Hat, you can download individual .deb packages and install them 
with dpkg -i package.deb.

Instead, however, the Debian people have gone a long way to try to get 
rid of all the problems you have with installing rpm's under Red Hat; 
the idea is that you can install a piece of software with one command. 
You first have to point your system to a database of .deb files, which 
will most likely be either on CD-ROMs or on the Internet, and then once 
it's set up, you can install any package in that database with one command:

apt-get install whatever

If you want to install nmap for example, just type:

apt-get install nmap

Don't worry about dependencies - there aren't any. Instead of getting:

Error! Exiting! 24 missing dependencies:
libnmap.so.1
libnmap.so.2
libnmap.so.43
liblibnmap.so.1
libnmap-devel.so.1
libnmap-doc
libnmap-devel.so.1
...

it just goes away, finds out what they are, and installs them all for 
you. If you've got broadband, it'll usually take not more than a couple 
of minutes to install pretty much whatever you want, and from 
experience, just about everything seems to be there (they claim 
something like 9,000 packages). For me, at least, it does work very well 
- a lot more so than computers usually manage.

You can query the database like this:

apt-cache search package

You can find out what's installed on your system like this:

dpkg -l

You can download a source package like this:

apt-get source package

- and then there's another command to get the build dependencies - can't 
quite remember what that's called.

If apt-get didn't return something, it's very often just because it's 
there under a different name. If this is the case, use apt-cache and 
just grep through the output a little if necessary until you find what 
you want. I've wanted to install the irssi IRC client a couple of times 
for example, but typing apt-get install irssi says:

[r@desk root]# apt-get install irssi
Reading Package Lists... Done
Building Dependency Tree... Done
Package irssi has no available version, but exists in the database.
This typically means that the package was mentioned in a dependency and
never uploaded, has been obsoleted or is not available with the contents
of sources.list
E: Package irssi has no installation candidate

However, using apt-cache returns:

[r@desk root]# apt-cache search irssi
irssi-scripts - useful set of scripts for irssi
irssi-common - common files for the irssi IRC client
irssi-gnome - GNOME version of the irssi IRC client
irssi-gtk - GTK version of the irssi IRC client
irssi-text - text-mode version of the irssi IRC client

- and so you realise that with this particular package, it's just a case 
of having to give the right name. This rarely happens though, at least 
for me, and that's about the only error I can recall getting from apt-get.

In any case, I'll refer you to the English HTML version of the APT-HOWTO 
on debian.org for further info (Debian's fairly well documented as 
well): http://www.debian.org/doc/manuals/apt-howto/index.en.html

I started with Debian in around August 2002 when setting up a server at 
school (== work). I've since switched both my desktop systems and a 
laptop over to it with no regrets. Only time I use Red Hat/Mandrake are 
when I'm looking for something that installs a swanky desktop where all 
the graphical things (and USB, scanner, etc) are most likely to work out 
of the box, and where KDE and GNOME are at their latest versions.

You can apparently do rpm for debian (i.e. it can install rpm files), 
which may have been mentioned here before, but I've never had the need 
to try it and so can't comment.

Hope this helps.

Andrew