Bug#273019: apache2-mpm-worker: subprocess post-installation script returned error exit
If you trace it down, it happens when apache2-mpm-worker.postinst goes
to run a2enmod cgid:
#enable cgid, but only on new installs.
if [ -z "$2" ]; then
a2enmod cgid
fi
which then runs this [the xv after the /bin/sh -e added by me]:
#!/bin/sh -exv
if [ -z $1 ]; then
echo "Which module would you like to enable?"
echo -n "Your choices are: "
ls /etc/apache2/mods-available/*.load | \
sed -e 's#/etc/apache2/mods-available/##g;' | sed -e
's/\.load$//g;' | xargs echo
echo -n "Module name? "
read MODNAME
else
MODNAME=$1
fi
+ '[' -z cgid ']'
+ MODNAME=cgid
#figure out if we're on a prefork or threaded mpm
if [ -x /usr/sbin/apache2 ]; then
PREFORK=`/usr/sbin/apache2 -l|grep prefork`
fi
+ '[' -x /usr/sbin/apache2 ']'
/usr/sbin/apache2 -l|grep prefork
++ /usr/sbin/apache2 -l
++ grep prefork
+ PREFORK=
dpkg: error processing apache2-mpm-worker (--configure):
subprocess post-installation script returned error exit status 1
Errors were encountered while processing:
apache2-mpm-worker
E: Sub-process /usr/bin/dpkg returned an error code (1)
A simple fix is to do this:
--- /usr/sbin/a2enmod.FCS 2004-09-24 10:49:36.000000000 -0700
+++ /usr/sbin/a2enmod 2004-09-24 10:52:24.000000000 -0700
@@ -13,7 +13,9 @@
#figure out if we're on a prefork or threaded mpm
if [ -x /usr/sbin/apache2 ]; then
- PREFORK=`/usr/sbin/apache2 -l|grep prefork`
+ if test "`/usr/sbin/apache2 -l|grep prefork`"; then
+ PREFORK=yes
+ fi
fi
if [ $MODNAME = "cgi" ] && [ -z $PREFORK ]; then
Blair
Reply to: