I have a deb package which I build but when I test it with dpkg (before put it in our repo) it can't install the dependencies put in DEBIAN/control file.

Package: package-name
Version: 1.0-1
Section: bla
Priority: optional
Architecture: amd64
Depends: openjdk-8-jre
Maintainer: user@mail.com
Description: BLa bla

That's correct. dpkg itself is not a dependency resolver, apt provides that functionality. You will need to first install the required dependencies if you wish to install something with dpkg -i, or you will need to run apt-get -f install after, which should pull in the missing dependencies if they are available.

  • So basically the thing above will work when installed with apt-get install? – slaffcheff Nov 7 '18 at 14:11
  • No, apt does not install arbitrary local deb files. It installs packages available from a repository. You need to dpkg -i $file and then run apt-get -f install to install the dependencies. Or you can just manually install the dependencies first, and dpkg -i $file will not give you any errors. – dobey Nov 7 '18 at 14:37
  • If you originally had used sudo apt install /path/to/your/.deb and if any required dependencies were in your enabled sources then the externel .deb & it's deps would have been installed. (with 16.04 on – doug Nov 7 '18 at 15:03

The easiest way is to install gdebi (package installer)

sudo apt-get install gdebi

or https://pkgs.org/download/gdebi

then you can open deb files using the gdebi GUI.........

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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