当前位置: 首页>>技术教程>>正文


如何在Ubuntu上安装.rpm?

, ,

问题描述

我是一个ubuntu用户,但我需要安装一个打印机驱动程序,这是一个RPM(* .rpm)文件(抱歉,这是Linux制造商网站上唯一可用的驱动程序)。

是否可以在ubuntu上安装RPM文件?

提前致谢。

最佳解决办法

https://help.ubuntu.com/community/RPM/AlienHowto,使用外星人包:

Alien converts an RPM package file into a Debian package file or Alien can install an RPM file directly. This is not the recommended way to install software packages in Ubuntu. If at all possible, install packages from Ubuntu’s repositories using Add/Remove, apt-get, or the Synaptic Package Manager. Package dependency conflicts may occur when attempting to install RPM packages.

这些命令应该这样做:

sudo apt-get install alien
sudo alien -i package_file.rpm

alien’s man page

WARNING

alien should not be used to replace important system packages, like init, libc, or other things that are essential for the functioning of your system. Many of these packages are set up differently by the different distributions, and packages from the different distributions cannot be used interchangeably. In general, if you can’t remove a package without breaking your system, don’t try to replace it with an alien version.

次佳解决办法

这个主题的另一个选择:

% mkdir tmp && cd tmp
% rpm2cpio packagefile-1.0.0.rpm | cpio -id

这会将RPM解压缩 – 就像tar /gzip一样 – 进入临时目录。这应该足以让您访问所需的文件(ppm?)和脚本。

参考资料

本文由Ubuntu问答整理, 博文地址: https://ubuntuqa.com/article/6683.html,未经允许,请勿转载。