Sunday, July 20, 2014

"RPM should not be used directly install rpm packages" Solution

Scenario:
In Ubuntu Linux, I tried to install rpm packages with command:
$ sudo rpm -ivh *.rpm

However, the installation is not successful and there is warning message:
RPM should not be used directly install rpm packages. Solution:
Install alien in debian
sudo apt-get install alien
Available Options for alien
Convert the package.rpm into a package.deb
sudo alien -d package-name.rpm
Convert the package.rpm into a package.deb, and install the generated package.
sudo alien -i package-name.rpm
If you want to keeps alien from changing the version number use the following command
sudo alien -k rpm-package-file.rpm

RPM's are used in RHEL for installing the softwares and packages . The rpm -ivh command is for RHEL based Linux. If you want to install an RPM file in Ubuntu (or any debian based file system) you need to install Alien to convert RPM into debian and then install the package.

Alien is a program that converts between the rpm, dpkg, stampede slp, and slackware tgz file formats. If you want to use a package from another distribution than the one you have installed on your system, you can use alien to convert it to your preferred package format and install it.

(Solution referenced from Tushar Makkar)

1 comment: