- Установка DEB пакетов на Arch Linux: как использовать debtap и не только
- 1. Использование Alien
- 2. Использование dpkg
- 3. Использование debtap
- Заключение
- Arch Linux — How to Install Deb Package — ALL Options
- Use Debtap to Install Deb Package on Arch Linux
- Using Dpkg
- Manually Install Deb Package on Arch Linux
- Check for Existing Arch Packages
- Use Alien
- References
- Installing a .deb package on Arch — Is it possible?
- 5 Answers 5
- Alternative
- Not the recommended way (possibly dangerous)
Установка DEB пакетов на Arch Linux: как использовать debtap и не только
Arch Linux использует свой формат управления пакетами Pacman, который обеспечивает удобным способом установку и удаление пакетов в системе. Однако, что делать, если вам понадобилось установить deb пакет, который не является частью репозитория Arch Linux?
Существует несколько способов установки deb пакетов в Arch Linux, и мы рассмотрим их.
1. Использование Alien
Alien это программа для конвертации пакетов из одного формата в другой. В частности, он может конвертировать deb пакеты в формат, который понимает Pacman.
Установите Alien из репозитория Arch Linux командой:
Затем сконвертируйте deb пакет в Pacman формат командой:
После этого вы можете установить полученный пакет с помощью Pacman командой:
2. Использование dpkg
Dpkg это утилита управления пакетами, используемая в Debian и его производных дистрибутивах. Она позволяет устанавливать, удалять и обновлять пакеты.
Чтобы установить deb пакет с помощью dpkg, выполните следующие команды:
3. Использование debtap
Debtap это программа, которая позволяет конвертировать deb пакеты в формат, который понимает Pacman. Она также может скачивать и устанавливать зависимости пакета, если они доступны в репозитории Arch Linux.
Установите Debtap из AUR командой:
Далее выполните команду:
Эта команда скопирует список пакетов из репозитория Debian в файл debtap.conf.
Скачайте deb пакет и выполните команду:
Debtap попросит вас ввести желаемое имя для полученного пакета. Затем она автоматически скачает и установит все зависимости.
Заключение
Теперь вы знаете, как установить deb пакет в Arch Linux, используя Alien, dpkg или debtap. Выберите наиболее подходящий для вас метод и устанавливайте пакеты в своей системе с комфортом.
Arch Linux — How to Install Deb Package — ALL Options
Arch Linux has a huge package repository. You should search for anything you need here first. Despite having such an extensive repository, there is still a chance that you may come across a package that isn’t available. If you can’t find what you are looking for, there is still a good chance that it may be available for Debian, Ubuntu, or Mint.
If you do find what you need but only have the deb package, you may want to try installing that deb package on your Arch system. There are multiple approaches that you could take to install a deb package on Arch Linux:
- Check for Existing Packages
- Use Debtap to Install Deb Package on Arch Linux
- Use Alien
- Manually Install Deb Package on Arch Linux
- Use Dpkg
Use Debtap to Install Deb Package on Arch Linux
The Debtap tool can be used to convert a deb package to an Arch linux package. It can then be installed using pacman.
Download the debtap snapshot: HERE.
tar zvxf ~/Downloads/debtap.tar.gz -C ~/arch cd ~/arch/debtap makepkg -s sudo pacman -U debtap-3.1.4-2-any.pkg.tar.xz
sudo pacman -S yaourt sudo yaourt -S debtap
debtap packagetoconvert.deb
sudo pacman -U deb-package-x.y.z-1-x86_64.pkg.tar.xz
debtap -U * debtap -U deb-package-x.y.z-1-x86_64.pkg.tar.xz
Using Dpkg
WARNING — You could corrupt your system with this method. Be careful and have a rescue disk ready.
Dpkg is actually available for Arch. Apparently it is meant for building packages on Arch that are meant to be installed on another system running Debian or Ubuntu. It isn’t actually meant to be used to install deb packages directly on Arch.
It used to be available from AUR but isn’t there anymore. It looks like it has been moved. You can get dpkg HERE.
sudo pacman -S yaourt sudo yaourt -S dpkg dpkg -i package.deb
Manually Install Deb Package on Arch Linux
To get the ar command you will need to install the binutils package:
Unpack the deb file and then unpack the two tarballs within it:
ar vx tar xvf control.tar.gz tar data.tar.gz cd ~/Downloads/google-chrome-stable_current_amd64 cd ~/Downloads/google-chrome-stable_current_amd64/etc sudo mv * /etc/ cd ~/Downloads/google-chrome-stable_current_amd64/opt sudo mv * /opt/
Check for Existing Arch Packages
Before trying to convert or install a deb package you should first check the repo. If it isn’t there you can also check AUR.
You can check the repo like this:
You can find packages on AUR HERE.
NOTE — AUR is user generated content so use these packages at your own risk.
Download snapshot from AUR website and then do the following to build and install it:
cd ~/Downloads/google-chrome makepkg sudo pacman -U *
You could also use an AUR helper to make things easier.
Use Alien
There is a tool called Alien that can convert from one package format to another. We haven’t verified if this supports converting from Debian to Arch.
References
Installing a .deb package on Arch — Is it possible?
The problem is simple — I have a .deb package and I want to install it on my Arch Linux. Is this possible? If yes, how?
Note that .deb files are just archives that can be uncompressed on any system. Depending on how complex the installation process is, that might be enough to «install» it.
5 Answers 5
Is it possible? Yes. Is it a good idea? That depends. You would only really need to do this if the application only exists as a .deb package. It is much more likely that you can just grab the upstream source and write a simple PKGBUILD to install it with pacman.
You should also search the AUR to ensure that someone hasn’t done this already.
Note, that even if a source package is not provided (or easily accessible), .deb files are easily extracted with libarchive . And, makepkg uses bsdtar (which uses libarchive ) by default to extract sources in a PKGBUILD . The result of this dependency chain is that you can easily write PKGBUILD s that make use of .deb archives as source files. 😀
dpkg for Arch exists. You should be able to install .deb packages on arch, but you should also not use it instead of pacman , so just use it for selected few packages.
The default command looks like:
Using an alternate package manager, though an option, is not the correct solution. The correct solution is to write a PKGBUILD to generate a pacman-native package.
Even if it isn’t the correct way to do it, it answers the original question. «Is it possible to install a deb package, and how to do it» is answered a lot better by this answer, than simply saying «write a PKGBUILD to generate a native package», since that is not what the user asks.
@BjörnLindqvist It’s a normal pacman package now, and can be installed using sudo pacman -S dpkg . However, after installing it, it warns the user that using it to install debian packages can break their system, so take that as you will.
Possible? Yes, but different methods exist on basis of use case.
Assumption: The debian package doesn’t have an equivalent package in the Arch (or Arch based Distribution’s) official repository.
Reason: yay is an AUR helper used to query & install AUR packages. In case the debian package has already been repackaged and published to the AUR by someone else.
- Install the package_name using yay:
note: replace package_name with the name of the debian package as found in the AUR. It’ll attempt to install the dependencies on it’s own using pacman .
Alternative
Assumption: The Debian package hasn’t been repackaged as an Arch package in AUR yet.
- Install debtap from AUR using yay :
sudo debtap -u debtap package_name.deb
sudo pacman -U package_name.pkg
Not the recommended way (possibly dangerous)
This method attempts to install the package using the debian packaging format on Arch, which is not recommended due to possible danger of corrupting your installation. If using this method it is recommended to be ready with a rescue disc image of Arch & backup of the user data/space.
sudo dpkg -i package_name.deb