08. Converting between package formats alien

There are times you need to convert among tarbells, .rpm, and .deb. Not all software and packages are available on both platforms, so this is not uncommon. The command line tool that gets this done is the alien.

Requirements

The alien program requires that you have both RPM and Debian package manager to convert between formats. Thus, install both using the appropriate yum or apt-get commands.

# apt-get install alien
# yum install alien

Syntax

The syntax for alien is as follows:

$ alien [options] file[...]

Options

Here are some of the commonly used options with alien.

-d|--to-deb
Convert the specified package to Debian. This option is the default.
-r|--to-rpm
Convert to RPM.
--to-slp
Convert for Stampede Linux.
--
-t|--to-tgz
Convert to a Slackware tgz package.
-i|--install
Installs the converted package, then removes it.
-k|--keep-version
Keep the version number of the generated package.
-v|--verbose
Verbose mode: display each command.

Converting rpm to deb and vice versa

As mentioned above, converting to .deb files is the default option.

# Converting to .deb
# alien packagename.rpm # Converting to rpm
# alien -r packagename.deb

Want to avoid becoming a code monkey?

Pragmatic Thinking

Want to avoid becoming a code monkey? Try Good Practice

Programmers have to constantly learn new concepts and technologies. In this book by Andy Hunt, you'll learn how our brains are wired, and how to take advantage of your brain's architecture to make the most of your learning. You'll learn new tricks and tips to learn more, faster, and retain more of what you learn.

$ Check price
34.9534.95Amazon 4.5 logo(86+ reviews)

More Good Practice resources

Take your Linux skills to the next level!

System Admin Handbook

Take your Linux skills to the next level! Try Linux & UNIX

This book approaches system administration in a practical way and is an invaluable reference for both new administrators and experienced professionals. It details best practices for every facet of system administration, including storage management, network design and administration, email, web hosting, scripting, and much more.

$ Check price
74.9974.99Amazon 4.5 logo(142+ reviews)

More Linux & UNIX resources

Ad