1

I'm testing my .deb package and cannot find out why it doesn't install the dependencies:

The control file's Depends line is:

Depends: zend-grid-module, postgresql-8.4, ${shlibs:Depends}, ${misc:Depends}

And when I run:

$ sudo dpkg -i zend-grid-module-test-application_1.0.2-2_all.deb

I see:

(Reading database ... 25616 files and directories currently installed.)
Preparing to replace zend-grid-module-test-application 1.0.2-2 (using zend-grid-module-test-application_1.0.2-2_all.deb) ...
Unpacking replacement zend-grid-module-test-application ...
dpkg: dependency problems prevent configuration of zend-grid-module-test-application:
 zend-grid-module-test-application depends on postgresql-8.4; however:
  Package postgresql-8.4 is not installed.
dpkg: error processing zend-grid-module-test-application (--install):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 zend-grid-module-test-application

And after that:

$ sudo apt-get install -y -f

outputs

Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following extra packages will be installed:
  zend-grid-module-test-application
The following packages will be upgraded:
  zend-grid-module-test-application
1 upgraded, 0 newly installed, 0 to remove and 36 not upgraded.
1 not fully installed or removed.
Need to get 0B/43.8kB of archives.
After this operation, 238kB disk space will be freed.
(Reading database ... 25618 files and directories currently installed.)
Preparing to replace zend-grid-module-test-application 1.0.2-2 (using .../zend-grid-module-test-application_1.0.2-2_all.deb) ...
Unpacking replacement zend-grid-module-test-application ...
Setting up zend-grid-module-test-application (1.0.2-2) ...

I don't see the postgresql dependency resolved, though I expect it to be installed with apt-get install -f -y

Any ideas what I'm missing?

3
  • Is the package you have currently installed (which is the same version number) created without the Depends on postgresql?
    – jordanm
    Commented Feb 11, 2013 at 23:02
  • @jordanm: yep... (but it's reproducible on clean as well)
    – zerkms
    Commented Feb 11, 2013 at 23:06
  • apt only install dependencies if they are available from repository. (also gdebi is more helpful to install packages as it checks & downloads (if available) dependencies before installing)
    – Pandya
    Commented Nov 6, 2014 at 6:01

2 Answers 2

1

This is the key line of output that explains what's happening:

The following packages will be upgraded:
  zend-grid-module-test-application

apt-get has found a different (and newer, or at least the same) version of zend-grid-module-test-application to install in some repository you have in sources.list. apt-cache policy zend-grid-module-test-application will tell you which one.

apt-get then proceeded to install that version (it's newer, after all!) instead of the version you tried with dpkg -i. And the one apt-get found does not depend on postgresql-8.4.

Most likely, you need to up the version in your debian/changelog before running dpkg-buildpackage. If you have it installed, dch will help you with this.

5
  • "And the one apt-get found does not depend on postgresql-8.4" --- they are. And the changelog version is incremented as expected.
    – zerkms
    Commented May 1, 2013 at 20:31
  • @zerkms Could you please add apt-cache policy zend-grid-module-test-application and apt-cache show zend-grid-module-test-application | grep Depends
    – derobert
    Commented May 1, 2013 at 20:41
  • it was 3 months ago :-S And I actually don't even remember how I solved it
    – zerkms
    Commented May 1, 2013 at 21:03
  • @zerkms hah, it showed up on the front page (I guess when Alessandro Meyer added an answer) and I didn't even notice the old date... Though, in the future, when you solve your own issue, please come back an add an answer. Answering your own question is encouraged here.
    – derobert
    Commented May 1, 2013 at 21:07
  • oh, got it - the solution was to create a local repository and install from it (it worked). So even though it is a solution for my task - it's not an answer for the question (that's why I didn't put it)
    – zerkms
    Commented May 1, 2013 at 22:15
0

Do you still have the version 8.4 of postgres in your repos?

I don't have them with the most recent version of Ubuntu and thats probably why apt-get is not able to resolve.

You must log in to answer this question.

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