Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

3 Answers 3

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. http://www.debian.org/doc/manuals/apt-howto/ch-helpers.en.html#s-equivs

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

Your Answer

 
discard

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.