Arch linux install debian

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.

Читайте также:  Linux ком строка сменить пользователя

    Install debtap from AUR using yay :

 sudo debtap -u debtap package_name.deb 
 sudo pacman -U package_name.pkg 

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 

Источник

How to Install Deb Package in Arch Linux

Install Deb Arch Linux Featured

If you’ve used Linux for any amount of time, you’ve noticed that one of the most common methods to install third-party applications is via a .Deb package. Often times this is the only way to get this software, as the developers can’t be bothered to go through the process of packaging in the dozens of different formats the Linux platform offers.

Many non-Debian-based Linux distributions have their own ways of getting around this issue. However, out of all Linux distributions, Arch Linux has the most interesting ways of getting a Debian package working. In this article we outline three ways to accomplish this and discuss which one is best.

Note: the steps below will work for any Arch-based distro.

Content

Installing via the AUR

The AUR is the first place to check when looking for software that isn’t officially supported in Arch Linux. Always check here first. It’s a service that allows anyone to upload a PKGBUILD script, designed to automatically take software from various places, download some or all of the needed dependencies to run them and compile a native Arch Linux package.

When using the AUR, there are two ways to go about it:

1. Use an AUR Helper

If you want to get stuff done quickly without having to jump through hoops, use an AUR helper like yay or yaourt. This won’t allow you to install a .deb file, but you may be able to find the package in arch format, created by arch users.

For more information about AUR hepers and how to install them, refer to our list of five awesome AUR helpers. Once you have one, just search the AUR, install and go.

Chances are if you’re using Manjaro, Endeavour, Garuda or any of the other Arch-based distros, you’ll have an AUR helper installed. Have a look at your distro’s documentation to check out what is included. Both Garuda and Endeavour use yay.

If you’d rather have a graphical environment, you can always install the pamac-aur package with your AUR helper – if it’s not installed already. Note that you’ll have to enable AUR support after installation under “Preferences -> Third Party.”

Linuxdebarch Pamacaur

2. Manual Installing AUR Packages

Another way of getting unofficial packages is by going to the AUR website , using the search bar, and downloading the “snapshot.” This is a less automated process, but it’s worth it if you want more granular control over how packages are made or installed. Instead of instantly installing the package, it’ll spit out a native package you can modify for your own purposes.

This means that if you have a custom personal repository set up, you can easily place these newly-built packages right in the repo for easy installation.

Читайте также:  Windows programs in linux mint

Note: if you just plan to use Arch’s base repositories and the AUR, installing packages with an AUR helper is a much better option than manual builds.

arch-linux-google-chrome-aur-snapshot

Most (if not all) programs that only come in DEB format will be found in the AUR. Here’s how to compile one as an Arch package from scratch.

sudo pacman -S --needed git base-devel
  1. Pay attention to the “Git Clone URL” on the AUR page of the package you want to download and install and copy it. Use that URL in the terminal opened in the home directory like so:

This will download the package’s git repository with a PKGBUILD configuration file for Arch’s powerful makepkg tool.

to navigate to the package’s build directory you just downloaded.

to create the package and install it automatically.

If you’re curious, the -s ( —syncdeps ) flag automatically grabs all the dependencies related to the available package in the official Arch Linux repositories, while the -i ( —install ) flag tells your system to not just compile the package but also integrate it into your system (e.g., create menu items, perform necessary integration into kernel arguments if there are any, etc.).

Install via Debtap

If, for some reason, a Deb you need isn’t in the AUR, install Debtap. It’s a program that dismantles a Debian package and makes it into an Arch package that your package manager can “understand.”

arch-linux-debtap

Warning: Use this method at your own discretion. The .deb package you install may break if the upstream package maintainers for the packages it depends on get updates that remove features or functionality. It doesn’t happen all the time, but you should be aware that this method may not always work fantastically.

  1. Start by installing Debtap via the AUR by following the instructions in the previous section.
  2. Once installed, run sudo debtap -u once to update debtap’s own repositories. Otherwise, the application will not work.
  3. Download the .deb file you wish to convert, cd into the directory you downloaded it into, and use the following command:
debtap packagetoconvert.deb
  1. At any point that Debtap asks you to input data, you can simply ignore this and press Enter on your keyboard.
  2. When finished, Debtap will have created a “pkg.*.zst” file that your package manager can interpret and install using offline installation procedures.
  3. cd into the directory you just converted the .deb package into and type:
sudo pacman -U [package-name]

Installing Manually

Warning: This method is highly unsafe and should only be used when there is no other option and you already have an advanced understanding of how certain packages work and certain behaviors that Arch expects. For example, some applications (like Plymouth, Virtualbox, etc.) may require hooks into the kernel that can only be done by editing configuration files and re-building the kernel with those hooks. Even more, using this method does not also install the dependencies of your package.

Though not the most elegant solution, when there’s no way to convert a .deb file with Debtap or compile with an AUR pkgbuild, the best method is to extract the Debian package itself and put the files where they should go.

Читайте также:  Linux команда монтирования дисков

Though this may involve a lot more tedium than previous methods, it’s more platform-independent, meaning you can use this method in many other distributions like Void Linux, Fedora, and openSUSE. I have not tested this in Gentoo and Slackware, so your mileage may vary with them due to how both distros like to handle installing packages.

Debian packages are archives with binaries inside, so no compiling is necessary. To install the files in any Deb package to Arch, first extract it to a folder. Keep in mind that you’ll also need to extract the archive known as “data” inside that folder as well.

arch-linux-debian-packages-google-chrome

For example, to install Google Chrome, you’d first cd into the extracted Deb folder with the extracted contents of “data.tar.xz” inside it.

cd ~/Downloads/google-chrome-stable_current_amd64

Then, run the ls command to reveal all of the folders that reside in the data archive inside the Deb package. Keep in mind the names of these folders. cd into each directory and move the contents of these directories to where they belong on the system.

cd ~/Downloads/google-chrome-stable_current_amd64/etc sudo mv * /etc/ cd ~/Downloads/google-chrome-stable_current_amd64/opt sudo mv * /opt/

Frequently Asked Questions

1. Why Is Debtap Taking So Long?

Debtap grabs the metadata available in the .deb file to construct the most faithful Arch package possible to minimize issues and provide relevant information on which dependencies pacman should install in addition to the package itself. This involves a significant amount of tedium beyond simply decompressing a tarball.

In addition to this, the script Debtap converts files with uses only one CPU core, making single-core performance the determining factor that affects how long your system will take to complete the operation. Expect large packages to take up to a few minutes.

2. Can I Use a Graphical Installer After Running Debtap?

Yes! If you have any version of pamac installed, you can run the tar-zst file Debtap generates through your file manager. By choosing pamac as the program to run the file, you can just double-click it just like you would any .deb package in Debian to install it and all of its dependencies automatically.

3. How does Debtap Compare with the AUR?

You should see Debtap as a last-ditch “dirty” method for installing something you really need and somehow can’t find in the AUR. If you can find something in the AUR, it will always be a better option to install that package than using a .deb file.

Wrapping Up

One of the best things about Arch Linux is how many ways users can install packages – from the AUR, to custom repositories, to decompiling other distributions’ packages so they’ll run. Though this information isn’t new, it’s certainly a good resource for those new to Arch and looking for ways to install their favorite programs.

Miguel has been a business growth and technology expert for more than a decade and has written software for even longer. From his little castle in Romania, he presents cold and analytical perspectives to things that affect the tech world.

Our latest tutorials delivered straight to your inbox

Источник

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