Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I sometimes download .deb packages from the internet and install them with dpkg -i package.deb If the packages have unmet dependencies. How can I install the dependencies automatically (similar to apt-get install package, and mark these dependencies as installed automatically instead of manually.

share|improve this question
up vote 4 down vote accepted

The usual way to handle this is to just do

#dpkg -i packagename

and then resolve the dependencies after the event by doing

#apt-get -f install

If the dependencies cannot be satisfied, apt will normally remove the package for you. Of course, if it doesn't you can do so yourself. This procedure should not mark the packages as manually installed.

share|improve this answer

While installing a package, if some dependency crops up which is uninstalled, you can use apt-file search dep and find the package that provides it and then download that package and then install it.

share|improve this answer
That will work, but it's far easier using this unix.stackexchange.com/q/17273/17312#17312. – Tshepang Jul 24 '11 at 20:03

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.