If you need to run a command that automatically resolves all of a .deb file's dependencies and installs the .deb file and its missing dependencies with the same command, you will need to update your installed software with
sudo apt update. Then open the terminal, change directories using
cd to the directory containing package-name.deb, and type:
apt install --simulate ./package-name.deb # This command does not require sudo.
package-name.deb should be replaced by the name of a .deb file located in the current directory that you are trying to install.
The above command will not install anything, but it will print a message listing any dependencies of package-name.deb that do not exist in the default Ubuntu repositories. You will need to manually download and install the .deb files of these missing dependency packages in order to install package-name.deb. Run
apt install --simulate ./manually-downloaded-package.deb before installing any of these manually downloaded dependency packages in order to check if these packages have any unmet dependencies themselves.
If the simulated command completes successfully, run the following command to install package-name.deb.
sudo apt install ./package-name.deb
There can be multiple .deb files in the same command if the .deb files are all located in the current directory.
sudo apt install ./package-name-1.deb ./package-name-2.deb