Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

dpkg: error while cleaning up

770 views
Skip to first unread message

Hans du Plooy

unread,
Oct 16, 2006, 6:30:18 AM10/16/06
to
Hi guys,

I'm busy setting up a mail relay on Etch 3 Beta, and I decided to have a
look at postfix-policyd. Installing it gave me an error though. Now
when I apt-get install anything, I get the same dpkg error for
postfix-policyd, and trying to remove it give the same problem:

mail:~# dpkg -r postfix-policyd
(Reading database ... 18557 files and directories currently installed.)
Removing postfix-policyd ...
dpkg: error processing postfix-policyd (--remove):
subprocess pre-removal script returned error exit status 10
grep: /etc/postfix-policyd.conf: No such file or directory
Starting Postfix greylisting policy daemon: start-stop-daemon: --start
needs --exec or --startas
Try `start-stop-daemon --help' for more information.
invoke-rc.d: initscript postfix-policyd, action "start" failed.
dpkg: error while cleaning up:
subprocess post-installation script returned error exit status 3
Errors were encountered while processing:
postfix-policyd
mail:~#

mail:~# apt-get remove postfix-policyd
Reading package lists... Done
Building dependency tree... Done
The following packages will be REMOVED:
postfix-policyd
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
1 not fully installed or removed.
Need to get 0B of archives.
After unpacking 336kB disk space will be freed.
Do you want to continue [Y/n]? y
(Reading database ... 18557 files and directories currently installed.)
Removing postfix-policyd ...
dpkg: error processing postfix-policyd (--remove):
subprocess pre-removal script returned error exit status 10
grep: /etc/postfix-policyd.conf: No such file or directory
Starting Postfix greylisting policy daemon: start-stop-daemon: --start
needs --exec or --startas
Try `start-stop-daemon --help' for more information.
invoke-rc.d: initscript postfix-policyd, action "start" failed.
dpkg: error while cleaning up:
subprocess post-installation script returned error exit status 3
Errors were encountered while processing:
postfix-policyd
E: Sub-process /usr/bin/dpkg returned an error code (1)
mail:~#


Any ideas?

Thanks


--
To UNSUBSCRIBE, email to debian-us...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org

Florian Kulzer

unread,
Oct 16, 2006, 2:10:07 PM10/16/06
to
On Mon, Oct 16, 2006 at 12:28:23 +0200, Hans du Plooy wrote:
> Hi guys,
>
> I'm busy setting up a mail relay on Etch 3 Beta, and I decided to have a
> look at postfix-policyd. Installing it gave me an error though. Now
> when I apt-get install anything, I get the same dpkg error for
> postfix-policyd, and trying to remove it give the same problem:
>
> mail:~# dpkg -r postfix-policyd
> (Reading database ... 18557 files and directories currently installed.)
> Removing postfix-policyd ...
> dpkg: error processing postfix-policyd (--remove):
> subprocess pre-removal script returned error exit status 10
> grep: /etc/postfix-policyd.conf: No such file or directory
> Starting Postfix greylisting policy daemon: start-stop-daemon: --start
> needs --exec or --startas
> Try `start-stop-daemon --help' for more information.
> invoke-rc.d: initscript postfix-policyd, action "start" failed.
> dpkg: error while cleaning up:
> subprocess post-installation script returned error exit status 3
> Errors were encountered while processing:
> postfix-policyd

[ snip: the same dpkg error when trying to "apt-get remove" ]

The first thing that seems to go wrong is that grep cannot find
something in the non-existent file /etc/postfix-policyd.conf. According
to apt-file this package should contain the file
/usr/share/postfix-policyd/postfix-policyd.conf. I would try to copy it
to /etc and hope that this enables dpkg to remove the package.

--
Regards,
Florian

Hans du Plooy

unread,
Oct 18, 2006, 6:20:17 AM10/18/06
to
On Mon, 2006-10-16 at 20:04 +0200, Florian Kulzer wrote:
> mail:~# dpkg -r postfix-policyd
> > (Reading database ... 18557 files and directories currently installed.)
> > Removing postfix-policyd ...
> > dpkg: error processing postfix-policyd (--remove):
> > subprocess pre-removal script returned error exit status 10
> > grep: /etc/postfix-policyd.conf: No such file or directory
> > Starting Postfix greylisting policy daemon: start-stop-daemon: --start
> > needs --exec or --startas
> > Try `start-stop-daemon --help' for more information.
> > invoke-rc.d: initscript postfix-policyd, action "start" failed.
> > dpkg: error while cleaning up:
> > subprocess post-installation script returned error exit status 3
> > Errors were encountered while processing:
> > postfix-policyd
>
> [ snip: the same dpkg error when trying to "apt-get remove" ]
>
> The first thing that seems to go wrong is that grep cannot find
> something in the non-existent file /etc/postfix-policyd.conf. According
> to apt-file this package should contain the file
> /usr/share/postfix-policyd/postfix-policyd.conf. I would try to copy it
> to /etc and hope that this enables dpkg to remove the package.

Hi,

I'm not getting the same error any more, but it's still complaining:

mail:~# cp /usr/share/postfix-policyd/postfix-policyd.conf /etc/


mail:~# apt-get remove postfix-policyd
Reading package lists... Done
Building dependency tree... Done
The following packages will be REMOVED:
postfix-policyd
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.

Need to get 0B of archives.
After unpacking 336kB disk space will be freed.
Do you want to continue [Y/n]? y

(Reading database ... 20229 files and directories currently installed.)


Removing postfix-policyd ...
dpkg: error processing postfix-policyd (--remove):
subprocess pre-removal script returned error exit status 10

Errors were encountered while processing:
postfix-policyd

E: Sub-process /usr/bin/dpkg returned an error code (1)
mail:~#


There isn't anything useful in the logs, so it's difficult to know what
exactly is going wrong.

Thanks
Hans

Florian Kulzer

unread,
Oct 18, 2006, 10:00:16 AM10/18/06
to
On Wed, Oct 18, 2006 at 12:17:42 +0200, Hans du Plooy wrote:
> On Mon, 2006-10-16 at 20:04 +0200, Florian Kulzer wrote:

[...]

We have to identify the problem in the pre-removal script:
/var/lib/dpkg/info/postfix-policyd.prerm

If you don't know shell scripting well enough to figure it out yourself
then tell us which version of the postfix-policyd package is currently
installed on your system. ("dpkg -l postfix-policyd")

--
Regards,
Florian

Hans du Plooy

unread,
Oct 22, 2006, 9:20:07 AM10/22/06
to
On Wed, 2006-10-18 at 15:57 +0200, Florian Kulzer wrote:
> > dpkg: error processing postfix-policyd (--remove):
> > subprocess pre-removal script returned error exit status 10
> > Errors were encountered while processing:
> > postfix-policyd
> > E: Sub-process /usr/bin/dpkg returned an error code (1)
> > mail:~#

> We have to identify the problem in the pre-removal script:
> /var/lib/dpkg/info/postfix-policyd.prerm

It looks like this:

#!/bin/sh

set -e
#set -x

. /usr/share/debconf/confmodule
. /usr/share/dbconfig-common/dpkg/prerm.mysql
dbc_go postfix-policyd $@

# Automatically added by dh_installinit
if [ -x "/etc/init.d/postfix-policyd" ]; then
if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
invoke-rc.d postfix-policyd stop || exit $?
else
/etc/init.d/postfix-policyd stop || exit $?
fi
fi
# End automatically added section

I don't see a "dbc_go" command anywhere?

> If you don't know shell scripting well enough to figure it out yourself
> then tell us which version of the postfix-policyd package is currently
> installed on your system. ("dpkg -l postfix-policyd")

My scripting skill is very basic, but enough to get a rough idea of what
most scripts do.

I have postfix-policyd 1.80-2.1

Thanks
Hans

Hans du Plooy

unread,
Oct 22, 2006, 11:20:08 AM10/22/06
to
On Sun, 2006-10-22 at 17:09 +0200, Florian Kulzer wrote:
> It is defined in /usr/share/dbconfig-common/dpkg/prerm which is sourced
> by /usr/share/dbconfig-common/dpkg/prerm.mysql. Seems to be part of a
> general system to help with packages that use databases. Do you have the
> latest version of package "dbconfig-common" installed?
>
> [...]
>
> > I have postfix-policyd 1.80-2.1
>
> If all else fails then I myself would be sorely tempted to simply
> comment out the "dbc_go" line in the pre-removal script.

Florian, Thanks. I'll check this out further tomorrow - don't have
access to the box right now. I'm sure apt-get update/upgrade will
eventually fix it, but I've gotten this error before, so I would like to
learn it inside-out.

Florian Kulzer

unread,
Oct 22, 2006, 11:20:09 AM10/22/06
to

It is defined in /usr/share/dbconfig-common/dpkg/prerm which is sourced


by /usr/share/dbconfig-common/dpkg/prerm.mysql. Seems to be part of a
general system to help with packages that use databases. Do you have the
latest version of package "dbconfig-common" installed?

[...]

> I have postfix-policyd 1.80-2.1

If all else fails then I myself would be sorely tempted to simply
comment out the "dbc_go" line in the pre-removal script.

--
Regards,
Florian

0 new messages