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?

The Clean Coder

Want to avoid becoming a code monkey? Try Good Practice

This book is packed with practical advice about everything from estimating and coding to refactoring and testing. It covers not only technique, but also attitude, as it shows how to approach software development with honor, self-respect, and pride; communicate and estimate faithfully; and understand that deep knowledge comes with a responsibility to act.

$ Check price
44.9944.99Amazon 4.5 logo(427+ reviews)

More Good Practice resources

Take your Linux skills to the next level!

Command Line Kung Fu

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

Command Line Kung Fu is packed with dozens of tips and practical real-world examples. You won't find theoretical examples in this book. The examples demonstrate how to solve actual problems. The tactics are easy to find, too. Each chapter covers a specific topic and groups related tips and examples together.

$ Check price
14.9914.99Amazon 4.5 logo(27+ reviews)

More Linux & UNIX resources

Ad