2

The problem

Taking any action that will change installed packages on my Ubuntu 12.04 LTS server (remove, install, purge, etc.) fails with:

Reading package lists...
Building dependency tree...
Reading state information...
Correcting dependencies... Done
The following extra packages will be installed:
  libpq-dev libssl-dev postgresql-9.1 postgresql-contrib-9.1
Suggested packages:
  oidentd ident-server locales-all libdbd-pg-perl
The following packages will be upgraded:
  libpq-dev libssl-dev postgresql-9.1 postgresql-contrib-9.1
4 to upgrade, 0 to newly install, 0 to remove and 4 not to upgrade.
7 not fully installed or removed.
Need to get 0 B/6,577 kB of archives.
After this operation, 6,144 B of additional disk space will be used.
dpkg: dependency problems prevent configuration of libssl-dev:
 libssl-dev depends on libssl1.0.0 (= 1.0.1-4ubuntu5.27); however:
  Version of libssl1.0.0 on system is 1.0.1-4ubuntu5.31.
dpkg: error processing libssl-dev (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of libpq-dev:
 libpq-dev depends on libpq5 (= 9.1.16-0ubuntu0.12.04); however:
  Version of libpq5 on system is 9.1.18-0ubuntu0.12.04.
 libpq-dev depends on libssl-dev; however:
  Package libssl-dev is not configured yet.
dpkg: error processing libpq-dev (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of postgresql-9.1:
 postgresql-client-9.1 (9.1.18-0ubuntu0.12.04) breaks postgresql-9.1 (<< 9.1.18-0ubuntu0.12.04) and is installed.
  Version of postgresql-9.1 to be configured is 9.1.16-0ubuntu0.12.04.
dpkg: error processing postgresql-9.1 (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of postgresql-contrib-9.1:
 postgresql-contrib-9.1 depends on postgresql-9.1 (= 9.1.16-0ubuntu0.12.04); however:
  Package postgresql-9.1 is not configured yet.
dpkg: error processing postgresql-contrib-9.1 (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of postgresql-server-dev-9.1:
 postgresql-server-dev-9.1 depends on libpq-dev (>= 9.1~); however:
  Package libpq-dev is not configured yet.
dpkg: error processing postgresql-server-dev-9.1 (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python2.7-dev:
 python2.7-dev depends on libssl-dev; however:
  Package libssl-dev is not configured yet.
dpkg: error processing python2.7-dev (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python3.2-dev:
 python3.2-dev depends on libssl-dev; however:
  Package libssl-dev is not configured yet.
dpkg: error processing python3.2-dev (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 libssl-dev
 libpq-dev
 postgresql-9.1
 postgresql-contrib-9.1
 postgresql-server-dev-9.1
 python2.7-dev
 python3.2-dev

Probable cause(s)

I'm almost certain the original cause was a full boot partition. But I've cleared this now by dpkg -ring some old kernels. I used this method after apt-get removinging them failed with a similar stack trace to the above.

Another potential source of the problem, though I think unlikely since I can't see any relation, is a Fsync bug in the postgres update, which I cured by deleting symlinks to the certificates and copying the certificates in directly as per the instructions on that link. That bug surfaced for me at exactly the same time as the apt-get problems so I'm mentioning it for completeness but, as I said, I don't see how it would break apt-get.

What I've tried

As mentioned I've already cleared some space in boot. I've tried apt-get install -f, which results in the stack trace I've posted above. I also tried editing the dpkg status file and removing initramfs with a similar lack of success. I've reverted back to the original status file now. Does anyone know how I might fix this?

4

You could try manually installing individual packages with dpkg (e.g. dpkg -i /path/to/package.deb). The .debs should be in /var/cache/apt/archives/. Start with the lib packages, especially libssl-dev and libpq-dev.

After each one, try apt-get -f install again to see if that has unwedged it.

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.