Linux apt get install rpm

How do I install and manage RPMs?

I have a burning desire to install RPMs onto my Ubuntu installation — is this possible? Can I use Yum — or another RPM Package Management tool?

Why? What kind of software are you missing that you can’t find in Ubuntu or the PPAs? Converting rpms with alien works, but it’s really not the best option.

In my day job I’m a linux System Administrator and I administer mainly Redhat machines. I love Ubuntu in that I don’t have to take my job home with me, but some things that Debian uses for configuration (mainly Apache) really drive me nuts. I much rather prefer the way RH maintains the apache software. So maintaining two package management solutions (yum and aptitude) seems like a more ideal solution (if it’s possible)

11 Answers 11

I wouldn’t recommend it. You probably could compile it but you wouldn’t have any Ubuntu-compatible package repositories for it to handle.

You can convert single RPM files into DEBs with Alien:

sudo apt-get install alien sudo alien my_package.rpm sudo dpkg -i my_package.deb 

Note: It might change the filename a little more than just the extension.

This won’t work for everything as packages link to other packages to fulfil dependencies. Obviously Red Hat/Fedora/CentOS use different package names to Ubuntu so you’re likely going to run into a whole load of pain.

Chances are if a DEB doesn’t exist, you’ll be better off just getting the source and compiling it.

if alien doesn’t work and you do end up using the source code directly, you can turn that into a .deb using checkinstall (which is in the universe repository, not installed by default).

Checkinstall is used in place of make install and is very handy to have around. Being able to remove packages is definitely a plus!

checkinstall is great for maintaining a self-build in a packaged environment but it does have some quirks that sometimes mean something that will install through make install won’t install. I use it when I can.

I tried to install the newest version of lftp this way, but it didn’t update the dependencies, so lftp fails to start trying to load with: error while loading shared libraries: libreadline.so.7

You will need alien to do that.

sudo apt-get install alien 

This will install all the required packages.Now you can start converting your .rpm files to .deb packages.

Available Options for alien :

Convert the package.rpm into a package.deb

sudo alien -d package-name.rpm 

Convert the package.rpm into a package.deb , and install the generated package.

Читайте также:  Astra linux зависает при установке

If you want to keep alien from changing the version number use the following command

alien -k rpm-package-file.rpm 

The short answer is, Don’t!

If you got an RPM that is so important that you need to have it, there is probably a Ubuntu package as well; and, if not, it is probably worth going through the trouble of compiling it from source into the Debian package format (that Ubuntu uses as well). Now, there are certain times when you can’t just recompile the software (if it’s not opensource it’s impossible) and in that case you can use the alien program. But, installing from RPM’s is a little like putting gasoline in a diesel car — it might work, but you wont benefit from it in the long run!

To build a package from source, there is a guide on the Ubuntu Wiki; there is also a program called checkinstall that can do some tricks with a default source-tree without setting up build instructions for the package. If you think that someone else can benefit from the programs that you compile, you can setup a repository on launchpad and share the package goodness!

If you really need to install RPMs on your system you should indeed try to convert them using ‘alien’.

Please keep in mind that by default ‘alien’ will meddle with the version number of the package. If you want the version number to stay the same, pass the option ‘-k’ when converting.

You should not try to use Yum or any other way of installing the RPMs, such as apt-rpm, themselves next to the existing DEB packages. The DEB and RPM systems manage the list of installed software separately and therefore don’t know what packages were installed previously by the other system. If, e.g., you’d try to install a GUI-bearing application with an RPM-based package management system, it’ll try to install vital system components itself, because it thinks they are not installed yet. This will either cause the installation to fail horribly, or overwrite vital system files.

Источник

How to install .rpm on Ubuntu? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.

This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.

I am an ubuntu user, however I need to install a printer driver which is a RPM (*.rpm) file (Sorry it’s the only driver available from the Manufacturer site for Linux). Is it possible to install RPM files on ubuntu? Thanks in advance.

2 Answers 2

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.

These commands should do it:

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

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.

Источник

Читайте также:  Linux вход через консоль

Linux apt get install rpm

Я давно заметил, что огромная часть пакетов программ новых версий, а особенно библиотек находятся либо в «исходниках», либо в .rpm пакете. А Linux Ubuntu, как Debian и им подобные дистрибутивы Linux используют для установки .deb пакеты. RPM же используется в таких дистрибутивах как Alt Linux, Mandriva, Fedora, Red Hat, Cent OS и др.

Но что делать, если необходимо установить пакеты программы запакованный в .rpm?

Можно конечно же установить менеджер пакетов .rpm командой:

sudo apt-get install rpm

И воспользуемся стандартной командой для установки/обновления пакетов формата .rpm (за пример возьмем музыкальный плеер Muine):

rpm -Uvh muine-0.6.3-1.1.fc2.rf.i386.rpm

В результате чего пакет не будет установлен и мы получим отчет о том, что необходимо установить программу Alien и воспользоваться ею:

rpm -Uvh muine-0.6.3-1.1.fc2.rf.i386.rpm
rpm: RPM should not be used directly install RPM packages, use Alien instead!
.
После чего идет ряд ошибок зависимостей пакетов.

А все это потому что, этот разный ряд дистрибутивов использует разные зависимости для пакетов программ. Поэтому нам необходимо установить пакет Alien командой:

sudo apt-get install alien

Alien является конвертером пакетов .rpm в .deb пакеты и обратно. И после установки Alien возможно будет их конвертировать.

Для конвертирования .rpm пакета в .deb пакет используем команду:

sudo alien —to-deb muine-0.6.3-1.1.fc2.rf.i386.rpm

либо можно воспользоваться другой командой:

alien -i muine-0.6.3-1.1.fc2.rf.i386.rpm

т.к. по умолчанию уже стоит —to-deb.

Для конвертирования .deb пакета в .rpm пакет воспользуемся командой:

sudo alien —to-rpm muine-0.6.3-1.1.fc2.rf.i386.deb

После чего можем спокойно устанавливать сконвертированный пакет .deb командой:

sudo dpkg -i muine_0.6.3-2.1_i386.deb

И теперь путем небольших манипуляций можем воспользоваться свежей версией плеера muine.

Хочу обратить внимание новичков в операционных системах Linux и в частности Linux Ubuntu на то, что все пакеты из данного мануала находятся в домашней папке пользователя, то есть /home/user (где user — имя пользователя).

Надеюсь, данный краткий мануал поможет не только решить проблему, но и понять от чего так.

Источник

How to Install RPM Packages on Ubuntu

RPM is a package format used by Red Hat-based derivatives like CentOS, RHEL or Fedora. The name comes from the RPM Package Manager (RPM), a free and open-source package management system for installing, uninstalling, and managing software packages in Linux.

Читайте также:  Linux vnc server no password

Is it possible to install .rpm files on Debian based distributions like Ubuntu? The answer is yes. However, you need to be careful as it could lead to package dependency conflicts.

Follow the steps in this tutorial to learn how to install .rpm packages on Ubuntu.

tutorial on installing rpm packages on Ubuntu

  • A user account with sudo privileges
  • Access to a terminal/command line
  • apt package manager (included by default)

Steps to Install an RPM Package on Ubuntu

Install Alien Package

To improve the stability of the installation process, we need to convert the .rpm file to a .deb file format.

Alien is a useful tool that facilitates conversions between Red Hat rpm, Debian deb, Stampede slp, Slackware tsz, and Solaris pkg file formats.

To install Alien follow these steps:

1. Check the status of the Universe distribution component:

sudo add-apt-repository universe

2. Make sure that your repositories are up-to-date:

3. The following command installs the Alien conversion tool:

sudo apt-get install alien

Convert .rpm Files to .deb Format

Now that Alien has been installed, it’s time to convert the files to the .deb format to complete the installation. Go to the folder where the .rpm file is located and enter the following command:

sudo alien packagename.rpm

This command instructs the Alien tool to initiate the conversion process of the .rpm file to a .deb file.

Note: You need to log in as a user with sudo access to install packages on Ubuntu.

Install the converted .rpm package on Ubuntu

Once the conversion has run its course, enter the following command to start the installation:

sudo dpkg –i packagename.deb

You have successfully installed a converted .rpm file on Ubuntu.

How to Install .rpm Package Directly on Ubuntu

The command we’ll use below installs a .rpm package in Ubuntu without previously converting it to a .deb file format.

This command can lead to serious compatibility issues if you attempt to run it with important system packages. RPM was not developed initially for Debian based distributions. As we have already installed Alien, we can use the tool to install RPM packages without the need to convert them first.

To complete this action, enter this command:

sudo alien –i packagename.rpm

You have now directly installed an RPM package on Ubuntu. Keep in mind that installing packages in formats that are not native to Ubuntu can pose a significant risk.

By following the tutorial, you have installed an RPM package on Ubuntu. Understanding the installation processes and the available options significantly reduce the likelihood of something going wrong. Check out our article on how to use the RPM command in Linux.

If you were planning to update essential system packages, a better option would be to use Ubuntu repositories and find adequate alternative packages.

Источник

Оцените статью
Adblock
detector