Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

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 have a dpkg file that i want to install.

But I get error messages that it is depending on other packages.

I used:

dpkg -i file.dpkg

Is there a way to install dependencies automatically without having to use apt-get/aptitude (the latest version of this dpkg wasnt available)

share|improve this question
up vote 3 down vote accepted

If this is a one-off, copy-paste the package names from the dpkg error message to an aptitude install command line. Otherwise, set up an apt repository for your own package, it's not hard. Here are a few possible methods:

  • If this is for Ubuntu, you can create your own personal package archive. This will make your packages easily available to everyone, so this method is suitable for generally-useful packages but not for in-house stuff.

  • You can set up a local repository using reprepro. It takes a couple of minutes to set up, but after that adding new packages is trivial (reprepro includedeb mydistribution /path/to/my.deb).

  • Another way to set up a local repository is to use apt-ftparchive from the apt-utils package. This is less automated than reprepro.

  • If all you're doing is patching or recompiling existing packages, apt-build is also an option.

share|improve this answer

You might break dependencies but here is a way to fool apt-get to install your own tar ball.

share|improve this answer

Manually installing missing dependencies can be a pain - which is why tools like gdebi exist:

sudo apt-get install gdebi

sudo gdebi package.deb

This should resolve the dependencies, and install them, all in one go. Note that you may need to add repositories to your apt sources.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .