1

If I download a Debian .deb package because it is not available through apt, I will usually try to install it using the command sudo dpkg -i package.deb. However dpkg, whilst being excellent at it's job, has one fatal flaw - it doesn't resolve dependencies. So if I have a package foo-1.0.0.deb which depends on packages bar-0.1.0 and baz-1.2.3, then bar and baz will not be installed, meaning I then must run sudo apt-get install bar baz to make foo work.

How, using one command, can I install a Debian package file and resolve it's dependencies?

1 Answers1

3

gdebi is the appropriate tool for this:

sudo gdebi foo_1.0.0.deb

will install foo from the given package file, and any necessary dependencies.

Stephen Kitt
  • 434,908