How can I install from an rpm file on ubuntu?

by user430190   Last Updated January 13, 2018 01:01 AM

I am new to Linux and using Ubuntu. While I have learned the apt-get command but that just directly downloads and installs from the repositories.

I now want to install a piece of software that I have downloaded. It is a rar extractor (I tried searching on google but can't find a clear answer), the extension is .rpm and I put it in a folder named downloads on my Desktop.

Can anyone help me on how to compile or install it using the terminal/bash?

Answers 5

RPM is a package for Red Hat based Linux distributions. RPM means Red Hat Package Manager. Ubuntu uses a package system called apt from Debian. Those packages have a .deb ending. I'm sure the package you want, is also available in that format. After downloading a deb file you can install it manually with this command:

dpkg -i package.deb

Technically, it is also possible to install an rpm package on another distribution, but I don't recommend that. It brings chaos and disorder.

March 24, 2015 07:10 AM

There is more than one way to install software on Linux:

  1. Repositories

    • Debian based distributions (Debian /Ubuntu/Mint) use apt-get to download and install from repositories.
    • RedHat (RedHat /Fedora/Centos) based distributions use yum to download and install from repositories.

    Pros: The software on the official repositories has been extensible tested for stability and for malware/spyware features. All the dependencies (libraries, additional packages,etc.) needed are automatically installed. Extremely easy upgrade of software packages. You can add additional sources (repositories) to have a wider choice of software.

    Cons: Sometimes the package you're looking for isn't in the official repositories or there is an older version. Additional repositories installed from unknown or non-trusted sources can put your system on risk.

  2. Pre-compiled packages

    • Debian based distributions (Debian /Ubuntu/Mint) use .deb files.
    • RedHat (RedHat /Fedora/Centos) based distributions use .rpm files.

    Pros: Easy install of software not included on repositories.

    Cons: You have to be more careful about packages not intended for your distrbution and version. There is a slight chance of installing malware when you use packages from unknown and non-trusted sources. No easy upgrades.

  3. Compile source code

    • Usually are .zip and tar.gz compressed files.

    Pros: Install software when there is no package for your Linux distribution. If you are a developer you can modify the source code to make the software more suitable to your needs.

    Cons: Compiling source code could be difficult and cumbersome. You will have to manually install all the dependencies. If you're not careful you can break your system. Nothing guarantees that you're not installing malware or spyware. Upgrades means compiling again.

March 24, 2015 09:36 AM

By using alien. All LSB compliant distributions must be able to handle RPM-packages and for Debian derived systems, that means using alien.

Generally an RPM-package should install cleanly on any distribution (if not, complain to the packager) which is LSB compliant. I don't believe Ubuntu is LSB compliant; not with a default installation at least -- most distributions are not LSB compliant with a default installation but usually have some *-lsb package which will fix the issue.

unrarwill allow you to extract rar-achives (if that's what you need) and is available for Ubuntu in a repository; please look into installing using standard means instead.

March 24, 2015 13:11 PM

It sounds like @user430190 already has a .rpm file and wants to convert it into a .deb / other file format to install it on Ubuntu. For example: I ran into something similar as many printer drivers may not have duplicate formats for "all" distributions. If this is the case I have been successful using Alien.

sudo apt-get install alien

then try

sudo alien -d -i <package_name>.rpm

-d, --to-deb Make debian packages. This is the default.

-i, --install Automatically install each generated package, and remove the package file after it has been installed. (remove this if you want to just have the package sitting there after run)

this converts the .rpm to a .deb file. You should really be looking for an alternative way to install your package first, as this can not work part of the time.

Beau Bouchard
Beau Bouchard
March 24, 2015 19:26 PM

It seems the person wants to install an application designed for the Red Hat Packager not Debian. Microsoft released Skype Insider app for Linux. However, their download is "RPM". You'd think Microsoft would be a bit more mindful considering their relationship in the Ubuntu group. All, up front, I apologize for not being a developer or Linux super user or anything. Thus, how to communicate with this group can be challenging. The world isn't as crystal clear, nor are it's people. Brian P.

January 13, 2018 00:23 AM

Related Questions

How to log out current user?

Updated December 01, 2015 22:00 PM