Rpm to deb windows

aboutubuntu.ru

Подпишитесь на RSS

VDS с Ubuntu Server

Мы работаем на виртуальном выделенном сервере от TrueVDS с Ubuntu на борту. Всем довольны и другим рекомендуем.

Вход в систему

Ubuntu 10.04 LTS

Наши посетители

Подпишитесь на комментарии

RSS всех комментариев:

Поиск

А вот зарегистрированные пользователи не утруждают себя просмотром рекламной информации на этом сайте.

Конвертирование rpm-пакетов в deb

Собрать и установить программу из исходников, разумеется, можно и в Ubuntu, как и в любом дистрибутиве. Сделать это хотя бы однажды — полезно для общего развития. Но на волне расцвета стандартизации и повышенного внимания к удобству пользования системой, обычным решением является установка программного обеспечения из специально собранных инсталляционных бинарных пакетов. Ubuntu как наследник Debian позаимствовала у родителя и системы управления пакетами (apt — advanced packaging tool) и формат пакетов (.deb).

Наиболее, насколько мне известно, популярный формат инсталляционных пакетов на сегодня — RPM (Red Hat Package Manager). Кроме создателя используют его сегодня почти все популярные дистрибутивы: Fedora Core, SUSE, Mandriva и отечественные ASP и ALT LInux. В следствии такой популярности логично предположить, что большинство пакетов разработчиков уж как минимум о создании rpm-пакета своего приложения заботят. И то верно: сам встречался с ситуацией, когда rpm есть, а deb-пакет — отсутствует.

К счастью, есть средства для конвертирования пакетов из одного формата в другой (и даже обратно). Встречайте пакет для борьбы с «чужими» пакетами: alien .

Устанавливаем:
sudo aptitude install alien

Ну, и всё: дальше можно пользоваться. Запуск команды с единственным параметром в виде имени rpm-пакета создаст в текущей директории его deb-клон. Примерно так:
alien package-1.4-1.rpm

После этого проверьте, что появилось в директории (командой ls например). Появиться там должен пакет package-1.4-2.deb . Что за дела, почему пакет изменил версию? Не беспокойтесь, это проделки alien — номер версии увеличивается утилитой дабы отразить новосозданность пакета.

Установить пакет можно будет сразу же командой:
dpkg -i package-1.4-2.deb

Не сложно отучить alien увеличивать версию, для этого имеется ключ -k ( —keep-version ). Команда alien -k package-1.4-1.rpm создаст, как и полагается, пакет package-1.4-1.deb .

Чтобы пакет был не только создан, но и сразу установлен в систему, есть также удобный ключик -i ( —install ), сразу запускающий установку (при этом вам не обязательно заботится об итерации версии):
alien -i package-1.4-1.rpm

Если вдруг понадобиться из deb-пакета сделать rpm, то и тут поможет alien с ключом -r :
alien -r package-1.4-1.deb

Как вы понимаете, alien удобная вещь, но не панацея. Пакеты имеющие множество параметров,привязанных к конкретному дистрибутиву (например, пути инсталляции и пр.) рискуют, будучи сконвертироанными, корректно не установиться или не заработать в вашей Ubuntu (да чего там в Ubuntu, даже rpm-пакет созданный для одного дистрибутива не всегда работает на другом — хотя это ситуация нечастая), так что когда имеется родной deb-пакет из репозитория — лучше использовать его. В остальных случая: дерзайте.

Читайте также:  Changing the root password in linux

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.

Convert RPM to DEB and DEB to RPM Package Using Alien

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:

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:

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:

Check CentOS Version Convert .deb to .rpm package in Linux

Читайте также:  Djay pro для windows

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:

Install RPM Package

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:

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:

Convert .deb to Alien Version

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):

Build RPM Package

Now you can proceed to install the package and verify as usual:

Install Build RPM Package

Finally, you can list the individual tools that were included with dateutils and alternatively check their respective man pages:

Verify Installed RPM Package

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.

Check Shell and Debian OS Version

You can safely disregard the messages about a missing signature:

Convert .rpm to .deb Package

After a few moments, the .deb file should have been generated and be ready to install:

Install RPM Converted Deb Package

After the installation, you can verify that zsh is added to the list of valid shells:

Confirm Installed Zsh Package

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.

If You Appreciate What We Do Here On TecMint, You Should Consider:

TecMint is the fastest growing and most trusted community site for any kind of Linux Articles, Guides and Books on the web. Millions of people visit TecMint! to search or browse the thousands of published articles available FREELY to all.

If you like what you are reading, please consider buying us a coffee ( or 2 ) as a token of appreciation.

We are thankful for your never ending support.

CentOS / RHEL / Fedora

Nobody was born with Linux Knowledge !

Labels

  • Other tips (25)
  • Downloads (22)
  • Linux Physical Security (17)
  • Linux Shell Commands (17)
  • VMware (10)
  • Software Management (9)
  • Backtrack (4)
  • Linux Servers (4)
  • Storage (1)
  • Updates (1)

Convert DEB to RPM or RPM to DEB Package

You can convert DEB file to RPM package and RPM to DEB package using alien command, if you have a *.rpm file that you want to install on a Debian or Ubuntu.

Читайте также:  Windows 10 screenshot hotkey

Finally, Install deb packages using the dpkg command,

Once you generate the rpm file, you can install it on Red Hat, Fedora or CentOS.
Finally install rpm,

21 comments:

I am trying to convert an .deb to .rpm but i am getting below error using alien

alien -r shbecrdeb_1.0.2_i386.deb
Use of uninitialized value in lc at /usr/local/share/perl5/Alien/Package/Deb.pm line 556.
Use of uninitialized value in lc at /usr/local/share/perl5/Alien/Package/Deb.pm line 556.
Warning: Skipping conversion of scripts in package : postinst
Warning: Use the —scripts parameter to include the scripts.
Use of uninitialized value in lc at /usr/local/share/perl5/Alien/Package/Deb.pm line 556.
Use of uninitialized value $_ in pattern match (m//) at /usr/local/share/perl5/Alien/Package/Deb.pm line 599.
Use of uninitialized value $_ in concatenation (.) or string at /usr/local/share/perl5/Alien/Package/Deb.pm line 600.
mkdir: invalid option — ‘0’
Try ‘mkdir —help’ for more information.
unable to mkdir -0: at /usr/local/share/perl5/Alien/Package.pm line 257.

Great Article Cyber Security Projects projects for cse Networking Security Projects JavaScript Training in Chennai JavaScript Training in Chennai The Angular Training covers a wide range of topics including Components, Angular Directives, Angular Services, Pipes, security fundamentals, Routing, and Angular programmability. The new Angular TRaining will lay the foundation you need to specialise in Single Page Application developer. Angular Training

Конвертируем RPM пакет в DEB

Добрый день всем, кто оказался на данном сайте. Могут возникнуть случаи, когда не окажется нужного пакета в deb расширении, но он будет в rpm. На этот случай, вы можете воспользоваться утилитой “Alien” и переконвертировать нужный вам пакет из rpm. Для начала нужно установить саму утилиту, для этого отправляемся в терминал и устанавливаем ее командой:

Затем нужно перейти в папку со скаченным пакетом, это можно сделать так же из терминала, набрав команду “cd” и указав путь к папке. Например, скаченный пакет лежит в папке “Загрузки”, для этого в терминале набираем команду:

Что бы посмотреть, а затем можно было просто скопировать название пакета, можно набрать команду “ls”. После чего копируем название пакета. Например, я буду конвертировать пакет браузера Opera с разреширением “rpm”. Перехожу в папку загрузки, затем набираю команду “ls”, выделяю мышкой название пакета и копирую его:

А затем, что бы переконвертировать данный пакет, набираю команду “alien” и вставляю название данного пакета. Что бы вставить название пакета, можно нажать на колесико мышки, после команды “alien”, а затем нужно нажать “Enter”:

После непродолжительной работы утилиты “Alien” в папке создастся пакет с расширением “deb”. Что бы его установить, можно воспользоваться командой, либо запустить файловый менеджер, перейти в папку и установить его двойным нажатием клавиши мышки. Для установки из терминала, наберите команду “dpkg -i и название пакета”. В данном случае, это будет выглядеть так:

Данный способ универсальный, то есть, он будет работать во всех deb ориентированных системах. Стоит помнить только о том, что могут возникнуть неразрешимые зависимости. Хотя, такое встречается крайне редко.

А на этом сегодня все. Надеюсь данная статья будет вам полезна.
С уважением Cyber-X

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