How to install deb on AlmaLinux 10

How to Install deb on AlmaLinux 10

In this tutorial, we will explain how to install DEB on AlmaLinux 10 OS. A .deb file is a software package format primarily used in Debian-based distributions. A .deb file is a compressed archive that contains the program’s files, including installation scripts and metadata. Although the .deb files are a core part of Debian-based Linux distributions and are widely used in Debian and its derivatives, it is possible to install .deb packages on RHEL (Red Hat Enterprise Linux) distributions, such as AlmaLinux, CentOS, Rocky Linux, and Fedora.

Installing .deb packages on AlmaLinux 10 is a straightforward process that typically takes between 5 and 10 minutes. Let’s get started!

Prerequisites

Step 1. Update the System

It is recommended to update the system packages to their latest versions available before installing any software on a fresh operating system. To do that, execute the following command:

sudo dnf update -y && sudo dnf upgrade -y

Step 2. Install Alien

Alien is a computer program that converts various Linux packages to .deb file formats. We can use alien to convert a .deb package to a different Linux package, such as .rpm, .tgz, or .slp. Since the .deb file format is used for Debian-based Linux distributions, and we want to install them on RHEL distributions such as AlmaLinux 10, we need to convert the downloaded .deb file to an .rpm package.

.rpm packages are used for RHEL-based Linux distributions; in our case, we need them for AlmaLinux 10. To achieve this, we will need to install the Alien software so we can do the conversion later. Alien is not included in the default repo of AlmaLinux 10, so we need to download it first:

cd /opt

wget -c https://sourceforge.net/projects/alien-pkg-convert/files/release/alien_8.95.tar.xz

Once downloaded, extract the files:

tar xf alien_8.95.tar.xz

The Alien is written in Perl and uses Perl for compiling, so we need to install Perl:

sudo dnf install perl -y

Once Perl is installed, go into the extracted alien directory:

cd /opt/alien-8.95

Then execute the following commands one by one to check, compile, and install the alien software:

perl Makefile.PL

make 

make install

After successful installation, you should receive the following output:

        .
        .
        .
Installing /usr/local/share/man/man1/alien.1
Installing /usr/local/share/man/man3/Alien::Package::Lsb.3pm
Installing /usr/local/share/man/man3/Alien::Package::Tgz.3pm
Installing /usr/local/share/man/man3/Alien::Package::Rpm.3pm
Installing /usr/local/share/man/man3/Alien::Package::Pkg.3pm
Installing /usr/local/share/man/man3/Alien::Package::Slp.3pm
Installing /usr/local/share/man/man3/Alien::Package::Deb.3pm
Installing /usr/local/share/man/man3/Alien::Package.3pm
Installing /usr/local/bin/alien
Appending installation info to /usr/lib64/perl5/perllocal.pod

Create a symbolic link for Alien to be accessible from everywhere:

ln -s /usr/local/bin/alien /usr/bin/alien

To check the Alien version, execute the command below:

alien -V

You should get the following output:

[root@host alien-8.95]# alien -V
alien version 8.95

Great! You installed Alien. Now, let’s proceed to the latest and most crucial step for converting and installing the .deb file.

Step 3. Install .deb on AlmaLinux 10

To install .deb on AlmaLinux 10, we need to convert it first to .rpm package using the alien command. Let’s first download a .deb package:

wget https://dl.google.com/linux/deb/pool/main/g/google-chrome-stable/google-chrome-stable_137.0.7151.68-1_amd64.deb

Once installed, we need to convert it to a .rpm package with the following command:

sudo alien --to-rpm google-chrome-stable_137.0.7151.68-1_amd64.deb

Once converted to .rpm, we can install the .rpm file with the command below:

rpm -ivh google-chrome-stable_137.0.7151.68-1_amd64.deb

About Alien Command

If you want to learn more about the Alien command, you can execute only the Alien command in your terminal, and you should get the following:

[root@host alien-8.95]# alien
You must specify a file to convert.

Usage: alien [options] file [...]
  file [...]                Package file or files to convert.
  -d, --to-deb              Generate a Debian deb package (default).
     Enables these options:
       --patch=      Specify patch file to use instead of automatically
                            looking for patch in /var/lib/alien.
       --nopatch        Do not use patches.
       --anypatch           Use even old version os patches.
       -s, --single         Like --generate, but do not create .orig
                            directory.
       --fixperms           Munge/fix permissions and owners.
       --test               Test generated packages with lintian.
  -r, --to-rpm              Generate a Red Hat rpm package.
      --to-slp              Generate a Stampede slp package.
  -l, --to-lsb              Generate a LSB package.
  -t, --to-tgz              Generate a Slackware tgz package.
     Enables these options:
       --description= Specify package description.
       --version=  Specify package version.
  -p, --to-pkg              Generate a Solaris pkg package.
  -i, --install             Install generated package.
  -g, --generate            Generate build tree, but do not build package.
  -c, --scripts             Include scripts in package.
      --target=       Set architecture of the generated package.
  -v, --verbose             Display each command alien runs.
      --veryverbose         Be verbose, and also display output of run commands.
  -k, --keep-version        Do not change version of generated package.
      --bump=number         Increment package version by this number.
  -h, --help                Display this help message.
  -V, --version            Display alien's version number.

That’s it. You learned how to install a .deb package on AlmaLinux 10 OS.

Of course, you don’t have to install it on your own if you have difficulties and you are not familiar with Linux. You can always contact our technical support. You only need to sign up for one of our NVMe Linux VPS plans and submit a support ticket. We are available 24/7 and will attend to your request promptly.

If you liked this post about installing DEB Packages on AlmaLinux 10, please share it with your friends or leave a comment down below.

Leave a Comment