2021-05-12 14:32:11
Ubuntu不支援rpm安裝軟體解決方法
以前經常使用的是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
使用alien將rpm包轉換成.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.
本文永久更新連結地址:http://www.linuxidc.com/Linux/2017-08/146269.htm
相關文章