- Как преобразовать файл rpm в файл deb
- Шаг 1: Установите пакет alien в Ubuntu
- Шаг 2. Проверьте, установлен ли этот пакет
- Шаг 3. Загрузите любой файл rpm.
- Шаг 4: запустите команду, sudo alien package_name.rpm
- Шаг 6: Теперь вы можете установить пакет .deb с помощью команды dpkg -i package-name.deb
- How to Convert From RPM to DEB and DEB to RPM Package Using Alien
- Step 1: Installing Alien and Dependencies
- Step 2: Converting from .deb to .rpm Package
- Step 3: Converting from .rpm to .deb Package
- Summary
- How To Convert RPM File Into DEB File In Linux Mint
- Как установить rpm пакет на Debian/Ubuntu/Linux Mint
- Как установить rpm пакет на Debian/Ubuntu/Linux Mint
- 8 thoughts on “ Как установить rpm пакет на Debian/Ubuntu/Linux Mint ”
Как преобразовать файл rpm в файл deb
В этом уроке мы узнаем, как преобразовать файл rpm в файл deb.
В операционной системе на базе Debian, например, ubuntu, расширение файла пакета является .deb-файлом.
Для установки пакета в ОС на основе debian мы используем команду dpkg -i package-name.deb.
В Linux на основе Red Hat расширение файла пакета поставляется в формате .rpm. (RPM означает Red Hat Package Manager).
Иногда есть только пакет, доступный в файле rpm.
Следовательно, для установки этого пакета в ОС на основе Debain нам необходимо преобразовать файл rpm в файл deb.
Следуйте приведенным ниже шагам, чтобы преобразовать файл rpm в файл deb.
Войдите в Debian на базе ОС (ubuntu / debian / linux mint и т. д.).
Итак, я использую машину Ubuntu для этого практического примера
Шаг 1: Установите пакет alien в Ubuntu
sudo apt-get install alien
Шаг 2. Проверьте, установлен ли этот пакет
Шаг 3. Загрузите любой файл rpm.
wget ftp://centos.arcticnetwork.ca/pub/centos/6.4/os/x86_64/Packages/vsftpd-2.2.2-11.el6_3.1.x86_64.rpm
Шаг 4: запустите команду, sudo alien package_name.rpm
linux@sharad:~/Desktop$ sudo alien vsftpd-2.2.2-11.el6_3.1.x86_64.rpm [sudo] password for linux: warning: vsftpd-2.2.2-11.el6_3.1.x86_64.rpm: Header V3 RSA/SHA1 Signature, key ID c105b9de: NOKEY warning: vsftpd-2.2.2-11.el6_3.1.x86_64.rpm: Header V3 RSA/SHA1 Signature, key ID c105b9de: NOKEY warning: vsftpd-2.2.2-11.el6_3.1.x86_64.rpm: Header V3 RSA/SHA1 Signature, key ID c105b9de: NOKEY warning: vsftpd-2.2.2-11.el6_3.1.x86_64.rpm: Header V3 RSA/SHA1 Signature, key ID c105b9de: NOKEY warning: vsftpd-2.2.2-11.el6_3.1.x86_64.rpm: Header V3 RSA/SHA1 Signature, key ID c105b9de: NOKEY warning: vsftpd-2.2.2-11.el6_3.1.x86_64.rpm: Header V3 RSA/SHA1 Signature, key ID c105b9de: NOKEY warning: vsftpd-2.2.2-11.el6_3.1.x86_64.rpm: Header V3 RSA/SHA1 Signature, key ID c105b9de: NOKEY warning: vsftpd-2.2.2-11.el6_3.1.x86_64.rpm: Header V3 RSA/SHA1 Signature, key ID c105b9de: NOKEY warning: vsftpd-2.2.2-11.el6_3.1.x86_64.rpm: Header V3 RSA/SHA1 Signature, key ID c105b9de: NOKEY warning: vsftpd-2.2.2-11.el6_3.1.x86_64.rpm: Header V3 RSA/SHA1 Signature, key ID c105b9de: NOKEY warning: vsftpd-2.2.2-11.el6_3.1.x86_64.rpm: Header V3 RSA/SHA1 Signature, key ID c105b9de: NOKEY warning: vsftpd-2.2.2-11.el6_3.1.x86_64.rpm: Header V3 RSA/SHA1 Signature, key ID c105b9de: NOKEY warning: vsftpd-2.2.2-11.el6_3.1.x86_64.rpm: Header V3 RSA/SHA1 Signature, key ID c105b9de: NOKEY warning: vsftpd-2.2.2-11.el6_3.1.x86_64.rpm: Header V3 RSA/SHA1 Signature, key ID c105b9de: NOKEY warning: vsftpd-2.2.2-11.el6_3.1.x86_64.rpm: Header V3 RSA/SHA1 Signature, key ID c105b9de: NOKEY warning: vsftpd-2.2.2-11.el6_3.1.x86_64.rpm: Header V3 RSA/SHA1 Signature, key ID c105b9de: NOKEY Warning: Skipping conversion of scripts in package vsftpd: postinst prerm Warning: Use the –scripts parameter to include the scripts. warning: vsftpd-2.2.2-11.el6_3.1.x86_64.rpm: Header V3 RSA/SHA1 Signature, key ID c105b9de: NOKEY vsftpd_2.2.2-12_amd64.deb generated linux@sharad-Lenovo-G570:~/Desktop$ ls vsftpd-2.2.2-11.el6_3.1.x86_64.rpm vsftpd_2.2.2-12_amd64.deb linux@sharad:~/Desktop$
Теперь вы можете увидеть файл vsftpd_2.2.2-12_amd64.deb
Шаг 6: Теперь вы можете установить пакет .deb с помощью команды dpkg -i package-name.deb
dpkg -i vsftpd_2.2.2-12_amd64.deb
Либо создание deb из файла rpm. Вы можете напрямую установить rpm с помощью команды alien.
Используйте команду, alien -i package-name.rpm
sudo alien -i vsftpd-2.2.2-11.el6_3.1.x86_64.rpm
How to Convert From RPM to DEB and DEB to RPM Package Using Alien
As I’m sure you already know, there are plenty of ways to install software in Linux: using the package management system provided by your distribution (aptitude, yum, or zypper, to name a few examples), compiling from source (though somewhat rare these days, it was the only method available during the early days of Linux), or utilizing a low level tool such as dpkg or rpm with .deb and .rpm standalone, precompiled packages, respectively.
In this article we will introduce you to alien, a tool that converts between different Linux package formats, with .rpm to .deb (and vice versa) being the most common usage.
This tool, even when its author is no longer maintaining it and states in his website that alien will always probably remain in experimental status, can come in handy if you need a certain type of package but can only find that program in another package format.
For example, alien saved my day once when I was looking for a .deb driver for a inkjet printer and couldn’t find any – the manufacturer only provided a .rpm package. I installed alien, converted the package, and before long I was able to use my printer without issues.
That said, we must clarify that this utility should not be used to replace important system files and libraries since they are set up differently across distributions. Only use alien as a last resort if the suggested installation methods at the beginning of this article are out of the question for the required program.
Last but not least, we must note that even though we will use CentOS and Debian in this article, alien is also known to work in Slackware and even in Solaris, besides the first two distributions and their respective families.
Step 1: Installing Alien and Dependencies
To install alien in CentOS/RHEL 7, you will need to enable the EPEL and the Nux Dextop (yes, it’s Dextop – not Desktop) repositories, in that order:
# yum install epel-release # rpm --import http://li.nux.ro/download/nux/RPM-GPG-KEY-nux.ro
The latest version of the package that enables this repository is currently 0.5 (published on Aug. 10, 2015). You should check http://li.nux.ro/download/nux/dextop/el7/x86_64/ to see whether there’s a newer version before proceeding further:
# rpm -Uvh http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-5.el7.nux.noarch.rpm
# yum update && yum install alien
In Fedora, you will only need to run the last command.
In Debian and derivatives, simply do:
Step 2: Converting from .deb to .rpm Package
For this test we have chosen dateutils, which provides a set of date and time utilities to deal with large amounts of financial data. We will download the .deb package to our CentOS 7 box, convert it to .rpm and install it:
# cat /etc/centos-release # wget http://ftp.us.debian.org/debian/pool/main/d/dateutils/dateutils_0.3.1-1.1_amd64.deb # alien --to-rpm --scripts dateutils_0.3.1-1.1_amd64.deb
Important: (Please note how, by default, alien increases the version minor number of the target package. If you want to override this behavior, add the –keep-version flag).
If we try to install the package right away, we will run into a slight issue:
# rpm -Uvh dateutils-0.3.1-2.1.x86_64.rpm
To solve this issue, we will enable the epel-testing repository and install the rpmrebuild utility to edit the settings of the package to be rebuilt:
# yum --enablerepo=epel-testing install rpmrebuild
# rpmrebuild -pe dateutils-0.3.1-2.1.x86_64.rpm
Which will open up your default text editor. Go to the %files section and delete the lines that refer to the directories mentioned in the error message, then save the file and exit:
When you exit the file you will be prompted to continue with the rebuild. If you choose Y, the file will be rebuilt into the specified directory (different than the current working directory):
# rpmrebuild –pe dateutils-0.3.1-2.1.x86_64.rpm
Now you can proceed to install the package and verify as usual:
# rpm -Uvh /root/rpmbuild/RPMS/x86_64/dateutils-0.3.1-2.1.x86_64.rpm # rpm -qa | grep dateutils
Finally, you can list the individual tools that were included with dateutils and alternatively check their respective man pages:
# ls -l /usr/bin | grep dateutils
Step 3: Converting from .rpm to .deb Package
In this section we will illustrate how to convert from .rpm to .deb. In a 32-bit Debian Wheezy box, let’s download the .rpm package for the zsh shell from the CentOS 6 OS repository. Note that this shell is not available by default in Debian and derivatives.
# cat /etc/shells # lsb_release -a | tail -n 4
# wget http://mirror.centos.org/centos/6/os/i386/Packages/zsh-4.3.11-4.el6.centos.i686.rpm # alien --to-deb --scripts zsh-4.3.11-4.el6.centos.i686.rpm
You can safely disregard the messages about a missing signature:
After a few moments, the .deb file should have been generated and be ready to install:
After the installation, you can verify that zsh is added to the list of valid shells:
Summary
In this article we have explained how to convert from .rpm to .deb and vice versa to install packages as a last resort when such programs are not available in the repositories or as distributable source code. You will want to bookmark this article because all of us will need alien at one time or another.
Feel free to share your thoughts about this article using the form below.
How To Convert RPM File Into DEB File In Linux Mint
Here’s how to convert a .rpm file into a .deb file in Linux Mint using ‘alien’ utility:
1. Issue the following command at the terminal –
sudo apt-get install alien
Enter ‘y’ to confirm the installation.
2. Now we’ll convert ‘opera-10.62-6438.i386.rpm’ into a .deb file. Issue the following command at the terminal –
sudo alien opera-10.62-6438.i386.rpm
Notice that the version number of the converted package changed from 10.62-6438 to 10.62-6439. If you want to preserve the original version number, use the ‘-k’ option. (So the command in our case would have been ‘ sudo alien -k opera-10.62-6438.i386.rpm ‘, if we were to preserve the original version number).
3. Now issue the following command at the terminal –
sudo chmod 777 opera-10.62-6439.i386.deb
This will ensure that users will have permissions to install the converted .deb file.
4. Now let us install opera browser using the converted .deb file –
5. That’s it. Opera browser installed, up and running from a .deb file converted from a .rpm file. Note that this utility supports conversion from LSB, Red Hat, Stampede and Slackware packages. This utility is very useful in case you want to install a package which is not available as a .deb file and should work on all Debian based derivative distributions including Ubuntu.
Как установить rpm пакет на Debian/Ubuntu/Linux Mint
Как установить rpm пакет на Debian/Ubuntu/Linux Mint
Не можете найти нужный пакет на Debian/Ubuntu/Linux Mint, а на RedHat, CentOS или Fedora он имеется в виде rpm пакета, не беда, можно его пересобрать в deb. В данной теме «Как установить rpm пакет на Debian/Ubuntu/Linux Mint» расскажу как я это делал, все очень просто и легко.
Первое что нужно сделать, — это установить:
# apt-get install cmake libc6-dev libc6-dev* g++-multilib
Устанавливаем нужный софт:
# sudo apt-get install alien dpkg-dev debhelper build-essential
И так, приступим. Допустим у нас есть какой то пакет который можно установить в CentOS или RedHat в виде rpm пакета, мы сейчас его пересоберем в deb пакет и установим его на Debian/Ubuntu/Linux Mint.
1. Конвертируем пакет c .rpm в .deb, для этого выполним:
# alien имя_вашего_пакета.rpm
После выполнение этой команды пройдет некоторое время и пакет пересобирется в deb.
# dpkg -i имя_вашего_пакета.deb
Все очень просто, не так ли? На этом я завершу статью «Как установить rpm пакет на Debian/Ubuntu/Linux Mint». Спасибо за посещение моего блога http://linux-notes.org
8 thoughts on “ Как установить rpm пакет на Debian/Ubuntu/Linux Mint ”
alien имя_вашего_пакета.rpm
File «viber.rpm» not found.
Везде на всех сайтах одно и тоже под копирку и ничего толкового, копипастеры
Я перед тем как что-то публиковать — обязательно проверяю на работоспособность! Если не работает, — может что-то не так делаешь
у тебя наверняка файл скачан в cd /home или cd /root.
Таким образом переходишь в корневой каталог с файлом который нужно распоковать и установить:
1. cd /home/Downloads/
2. alien alien имя_вашего_пакета.rpm
3. dpkg -i имя_вашего_пакета.rpm