Ubuntu: Install DEB Instructions with Different Methods

ubuntu install deb
ubuntu install deb

DEB (also known as Debian packages) is the primary software package of Ubuntu. DEB packages allow easy installation of software. An additional advantage is that their dependencies are bundled together. In Ubuntu, install DEB packages easily with the easy to follow instructions. Learning how to install DEB packages is important when you are working on Ubuntu systems.

What is a DEB file?

At Unixmen, we always start from the basics. As usual, we will start from the basic information: what a DEB file is. A DEB file contains binary files, libraries, and other important components required for smooth installation of software on Linux systems, including Ubuntu systems. Although APT package managers and the Ubuntu software center are the most used platforms to install software, there can be cases where you may have to manually install packages. Manually installing DEB packages is required when software packages are unavailable in standard repositories.

In Ubuntu Install DEB Files Using Command Line Interface

Installing DEB files using the command line interface offers more flexibility, control, and clarity in resolving dependencies. You can install the DEB packages via Debian package manager and also via apt.

Install DEB Package using DPKG

The dpkg command is to invoke Debian package manager. It is one of the basic ways to install a DEB package. Here is the syntax for the dpkg command:

sudo dpkg -i /Location/Of/file.deb

Executing this command installs the DEB package specified in the path. If there are any dependencies, you have to install them manually. To correct the dependencies, execute the command:

sudo apt-get install -f

This command automatically fetches and installs the missing dependencies (if any) for the package. Dependency installation ensures that the package is fully functional.

Install DEB Package Using APT

The APT command is another efficient way in Ubuntu to install DEB packages. An added advantage of APT when compared to DPKG is that the missing dependencies are installed automatically here. Here is the syntax to install a DEB package using APT:

sudo apt install ./FileName.deb

It is important to notice the backslash before the file name. This operator indicates that the file is in the current directory. This method is preferred over DPKG because it automatically resolves and installs dependencies.

How to Install DEB Files through Ubuntu Software

If the command line interface is uncomfortable for you, use DEB files graphically using Ubuntu software center or GDebi.

How to Install DEB files using Ubuntu Software Center

Go to the directory where the file is located. Right-click on the file and select “Open with software install”. Then click “Install”. This action installs the DEB package with Ubuntu Software Center.

How to Install DEB files using GDebi

GDebi, a lightweight GUI tool, makes it easy to install DEB files and resolves dependencies efficiently like APT. First install GDebi by executing the command

sudo apt install gdebi

Once GDebi is installed, right-click any DEB file and select Open with GDebi Package Installer.

Common Error When You Install DEB Files

The most common error when you manually install a DEB file is the problem of missing dependencies. In Linux, almost all software packages require a few dependencies. If you manually install DEB packages, ensure you have dependencies installed. Always use tools that resolve dependencies like APT and GDebi.

DEB files are compiled for specific architectures with exception for some packages that are compatible with different architectures. Ensure you install the correct DEB file for your architecture.

Some broken DEB packages will not install properly and can disrupt smooth performance of the system.

Wrapping Up

In Ubuntu, install DEB files easily with the instructions we have provided above. Every method explained in this article has its own advantages and disadvantages. Choosing the best one involves only this question: which method suits your preference and system setup. Some users with Ubuntu, install DEB files through the command line because they are used to it. While some new users prefer the GUI method. That does not mean one method is superior to the other. Let us know if you face any roadblocks or you found any other easier way in Ubuntu to install DEB files.

Related Link

Debian — Details of package gdebi in buster

Some More Articles that would be of Interest to You