Building a .deb file, install dependencies too
Solution 1:
Gdebi
gdebi
installs a deb package and its dependencies. To use it run:
sudo gdebi package.deb
In newer versions of Ubuntu, this is not installed by default, so you will need to install it from the repositories.
See man gdebi
for a full list of options.
gdebi
is the command line equivalent to the graphical tool of the same name that used to be included by default in Ubuntu. The command for the graphical tool is gdebi-gtk
and has similar functionality: