Ubuntu不支持rpm安装软件解决方法

发布时间:2021-07-30 11:26
 

以前经常使用的是RedHat Linux,习惯使用rpm方法安装软件。最近发现Ubuntu系统居然不支持rpm方法安装软件,提示信息如下:

root@root$ rpm -i package.rpm

The program 'rpm' is currently not installed.  You can install it by typing:

sudo apt-get install rpm

然而通过apt-get安装rpm包以后依然不能够安装,最后才知道原来Ubuntu不支持rpm,使用rpm安装提示信息如下:

rpm: RPM should not be used directly install RPM packages, use Alien instead!

rpm: However assuming you know what you are doing...

error: Failed dependencies:

.......................

具体的解决方法如下:

首先安装alien

apt-get install alien

使用alienrpm包转换成.deb格式的包

alien package.rpm

执行完成后生成一个.deb的软件包,再通过dpkg安装.deb格式的包

dpkg -i package.deb

还有一种方法,直接使用alien安装rpm格式的包,自己还没有试过.

alien -i package.rpm

对于这个问题,官方的说法是这样的

Do not install rpm in Debian (I don't mean flash-plugin, I mean rpm package management). Debian's package management system (which makes sure everything is installed properly and with no conflicts.) is dpkg and it also includes apt-get, Synaptic and aptitude that use dpkg. RPM will bypass dpkg, so you may cause serious damage to your system.

If you need to install an rpm package, you must do it using the tool "alien". It converts RPM packages to .deb and installs them properly through dpkg.

 

 

本文导读