How to install deb file in Ubuntu using terminal. Learn how to install local deb package and how to install debian package with dependencies on Ubuntu Linux.
How to install local deb package
As we know the apt is a command-line utility for installing, updating, removing, and managing deb packages on Ubuntu/Debian and Ubuntu Linux Derivatives. To install local deb packages using apt, you will have to execute the apt command with the full path to the deb file.
$ sudo apt install ./DEB_PACKAGE.deb
You will be prompted to type Y to continue and henceforth the apt package manager will resolve and install all the package dependencies.
How to install local deb package with gdebi
gdebi is another grea tool for installing local deb packages. It is not installed by default in Ubuntu and can be installed using the following command:
$ sudo apt install gdebi
Once installed use gdebi to install the deb package with gdebi using the following command:
$ sudo gdebi DEB_PACKAGE.deb
You will be asked “Do you want to install the software package? [y/N]:” select Y when prompted and gdebi will then install the deb package and all its dependencies.
How To install deb with dependencies on Ubuntu
To list all dependencies of a deb file, run the following command:
$ dpkg -I /path/to/file.deb
You can also install deb files on Ubuntu using the dpkg command “sudo dpkg -i [FILE-NAME].deb”
Also, to solve the dependency issues, run the following command:
$ sudo apt install -f
Here the ‘-f’ or ‘–fix-broken’ option fixes the broken dependencies of the system.