Most users feel difficult in installing the local Debian (.deb) packages on your Linux system. So, if they have an appropriate .deb file of required software, they do not know how can install it on the Debian system. There are some useful commands are available in Linux that facilitate users to install local Debian (.deb) packages.
Here at LinuxAPT, we shall look into how to install Debian (.deb) packages in Debian 11 bullseye using the command line.
Different ways of installing Debian (.deb) packages on Debian 11 system
1. Install Debian packages using Apt
The default command-line tool, Apt (Advanced packaging tool) is used to install new packages, update an existing package, upgrade and remove certain packages from Debian, Ubuntu, and Linux Mint distributions.
The apt command does not install ".deb" packages directly. It only installs the primary name packages such as MongoDB, apcahe2, etc. Apt command retrieves the package information from the '/etc/apt/sources.list' file and installs the package using the package name.
So, if we want to install a local Debian package (.deb), it is necessary to specify the .deb file path using "./" with the name:
$ sudo apt install ./libappindicator3-1_0.4.92-7_amd64.deb
2. Install Debian Packages using dpkg
Dpkg is another command line package manager used to install Debian packages. It is also used to manage, upgrade, and remove packages from Debian and its other derivatives such as LinuxMint and Ubuntu.
Unlike apt package manager, it does not download and install packages along with all dependencies. Dpkg does not install packages from remote addresses. It only installs the downloaded packages. Use the 'i' flag with the dpkg command to install Debian packages on Debian 11 system:
$ sudo dpkg -i libappindicator3-1_0.4.92-7_amd64.deb
If you receive an error after installing a package on the Debian system then, using the '-f' flag with the 'dpkg' command this error can be resolved. Use the following command to resolve the broken dependencies error:
$ sudo apt-get install -f
3. Install Debian Packages using the Gdebi command
Gdebi is another command-line tool used to install local Debian packages. It installs the package's dependencies during the software installation. The gdebi is not a default command-line tool. So, first, install gdebi by using the following command:
$ sudo apt install gdebi
Then, Install local Debian packages using the following gdebi command:
$ sudo gdebi libappindicator3-1_0.4.92-7_amd64.deb
[Need to install any package on Debian Linux system ? We can help you. ]