How To Install Deb Package on OpenSUSE
In this tutorial, we will show you how to install deb package on openSUSE. OpenSUSE, a popular Linux distribution known for its stability and user-friendly interface, primarily uses RPM packages for software installation. However, there may be instances where you need to install a .deb package, which is typically used in Debian-based systems.
Before diving into the installation process, it’s crucial to understand the differences between .deb and .rpm package formats. OpenSUSE, like other RPM-based distributions, uses .rpm packages as its native format. These packages are specifically designed for RPM package management systems and are not directly compatible with Debian-based systems that use .deb packages.
The main differences lie in the package structure, metadata, and dependency handling. While both formats serve similar purposes, they are not interchangeable without conversion or special tools. This incompatibility is the primary reason why installing .deb packages on OpenSUSE requires additional steps or alternative methods.
This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘sudo
‘ to the commands to get root privileges. I will show you the step-by-step installation of the K9s on openSUSE.
Prerequisites
- A server running one of the following operating systems: openSUSE (Leap or Tumbleweed)
- It’s recommended that you use a fresh OS install to prevent any potential issues.
- Basic familiarity with terminal commands.
- You will need access to the terminal to execute commands. openSUSE provides the Terminal application for this purpose. It can be found in your Applications menu.
- You’ll need an active internet connection.
- You’ll need administrative (root) access or a user account with sudo privileges.
Step 1. Update System Packages.
Before attempting to install a .deb package on OpenSUSE, it’s crucial to ensure that your system is up to date. Open a terminal and run the following command to update your system:
sudo zypper refresh sudo zypper update
This command will refresh the package repositories and install any available updates, ensuring that your system is in a stable and compatible state.
Step 2. Installing Deb Package on OpenSUSE.
- Method 1: Using Alien to Convert DEB Packages
Alien is a powerful tool that can convert between different package formats, including .deb to .rpm. This method is often the most straightforward for installing .deb packages on OpenSUSE. Installing Alien on OpenSUSE:
Add the necessary repository:
sudo zypper addrepo https://download.opensuse.org/repositories/home:/KAMiKAZOW/openSUSE_Factory/home:KAMiKAZOW.repo
Refresh the repository:
sudo zypper refresh
Install Alien:
sudo zypper install alien
Converting and Installing a .deb Package:
sudo alien --to-rpm package_name.deb
Install the converted package:
sudo zypper install package_name.rpm
If you encounter an “rpmbuild not found
” error, install the rpmbuild
package:
sudo zypper install rpm-build
- Method 2: Using SNAP Packages
Snap is a universal package management system that works across various Linux distributions, including OpenSUSE. Many applications available as .deb packages are also available as Snap packages, providing an alternative installation method.
Add the Snap repository:
sudo zypper addrepo --refresh https://download.opensuse.org/repositories/system:/snappy/openSUSE_Leap_15.6/system:snappy.repo
Import the GPG key:
sudo zypper --gpg-auto-import-keys refresh
Update the package cache:
sudo zypper dup --from snappy
Install Snapd:
sudo zypper install snapd
Enable and start the Snapd service:
sudo systemctl enable --now snapd sudo systemctl start snapd
Once Snapd is installed, you can search for and install Snap packages using the snap command. To search for a specific package, run:
snap search package-name
To install a Snap package, use the following command:
sudo snap install package_name