以前经常使用的是redhat,习惯使用rpm方法安装软件。最近发现Ubuntu系统居然不支持rpm方法安装软件,提示信息如下:
root@root$rpm-ipackage.rpm Theprogram'rpm'iscurrentlynotinstalled.Youcaninstallitbytyping: sudoapt-getinstallrpm 然而通过apt-get安装rpm包以后依然不能够安装,最后才知道原来Ubuntu不支持rpm,使用rpm安装提示信息如下: rpm:RPMshouldnotbeuseddirectlyinstallRPMpackages,useAlieninstead! rpm:Howeverassumingyouknowwhatyouaredoing... error:Faileddependencies: .......................
具体的解决方法如下:
首先安装alien,
apt-getinstallalien
使用alien将rpm包转换成.deb格式的包
alienpackage.rpm
执行完成后生成一个.deb的软件包,再通过dpkg安装.deb格式的包
dpkg-ipackage.deb
还有一种方法,直接使用alien安装rpm格式的包,自己还没有试过.
alien-ipackage.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.