when packaging goes wrong

Greg Rundlett (freephile) greg at freephile.com
Fri Jan 8 12:28:05 EST 2010


I installed pdns and pdns-recursor just the other day on my Ubuntu
9-04 system.  I did not configure or use the system, leaving that for
another day.

Today, there were upgrades available, so I attempted an upgrade,
however the upgrade failed due to the fact that I had pdns-recursor
3.1.7-2 installed, but not running.

I tried to remove the package and also reinstall the package, using
synaptic and apt-get and dpkg but could not, because the problem was
in a postinst script.

I tried to start the service (thinking that would allow the script to
execute), but after checking the documentation, it seems that the
documentation does not reflect the current behavior of the system :-(

Since I wanted to get powerdns up and running, I figured now would be
the time.  So, I found this wonderful quickstart guide
https://www.sevenl.net/blog/how-to-install-and-configure-powerdns/ and
got both pdns and pdns_recursor running with the gmysql backend
thinking that now I'd be able to run the package upgrade.

However, it still failed.

So, I resorted to editing the postinst script
vi /var/lib/dpkg/info/pdns-recursor.postinst
throwing errors to /dev/null and telling it to exit 0

Still I could not remove pdns-recursor even with
dpkg --remove --force-remove-reinstreq pdns-recursor

So, I took an 'over the top' approach described here:
http://www.khattam.info/2009/08/04/solved-subprocess-pre-removal-script-returned-error-exit-status-2-error/
which is to edit and remove the section in /var/lib/dpkg/status; and
install the package

Worked for me.


Greg Rundlett

nbpt 978-225-8302
m. 978-764-4424
-skype/aim/irc/twitter freephile
http://profiles.aim.com/freephile


More information about the gnhlug-discuss mailing list