8

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)

3 Answers 3

3

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.

1

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

0

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.

You must log in to answer this question.

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