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?

Answers:

Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.

Method 1

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.

Method 2

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:

# dpkg -i package.deb

Method 3

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.

  1. Install yay using pacman:
     sudo pacman -S yay

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.

  1. Install the package_name using yay:
     yay -S package_name

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.

  1. Install debtap from AUR using yay:
     yay -S debtap
  2. Create equivalent package using debtap:
     sudo debtap -u
     debtap package_name.deb
  3. Install using pacman:
     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.

  1. Install dpkg using yay:
     yay -S dpkg
  2. Install the debian package using dpkg:
     sudo dpkg -i package_name.deb

Method 4

You can install dpkg by: yaourt dpkg.

If you don’t have yaourt, you can get it from its AUR page.

Then just cd to where you put it and dpkg -i package.deb whatever the package may be

Method 5

This works for some packages:

# You might append this to ~/.bashrc
function debinstall() {
  ar x $1 data.tar.xz
  mkdir /tmp/$1_dir
  tar -C /tmp/$1_dir -xf data.tar.xz
  sudo rsync /tmp/$1_dir /
  rm -f data.tar.xz
  rm -rf /tmp/$1_dir
}
    
# Usage
debinstall draw.io-amd64-13.6.2.deb # Put your package name instead


All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x