libapache2-mod-mono fails to preconfigure

Bug #179280 reported by John Ryan
0
Affects Status Importance Assigned to Milestone
mod-mono (Ubuntu)
Fix Released
Low
Ralph Janke

Bug Description

Binary package hint: libapache2-mod-mono

When trying to install libapache2-mod-mono for the first time, the package fails to preconfigure because the file /etc/apache2/mod-available/mod_mono.conf is not available. It will be installed by the libapache2-mod-mono package. The installation output is given below:

user@host:/etc/mono-server2$ sudo apt-get install libapache2-mod-mono
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
  libapache2-mod-mono
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0B/35.0kB of archives.
After unpacking 164kB of additional disk space will be used.
Preconfiguring packages ...
Using mono-apache-server2...
/tmp/libapache2-mod-mono.config.77141: line 70: /etc/apache2/mods-available/mod_mono.conf: No such file or directory
libapache2-mod-mono failed to preconfigure, with exit status 1
Selecting previously deselected package libapache2-mod-mono.
(Reading database ... 121322 files and directories currently installed.)
Unpacking libapache2-mod-mono (from .../libapache2-mod-mono_1.2.4-1_i386.deb) ...
Setting up libapache2-mod-mono (1.2.4-1) ...
Using mono-apache-server2...
Module mod_mono installed; run /etc/init.d/apache2 force-reload to enable.

Workaround:
To ensure a clean install, you can simply remove (don't autoremove or purge) the package and re-install:

sudo apt-get remove libapache2-mod-mono
sudo apt-get install libapache2-mod-mono

Because /etc/apache2/mod-available/mod_mono.conf now exists, the second installation will complete cleanly.

Cause:
The two lines running 'sed' in the following section of the config script in the installation package should be enclosed by a check for the existence of the file /etc/apache2/mods-available/mod_mono.conf:

# Change the includes as appropriate
MONO_CONF=/etc/apache2/mods-available/mod_mono.conf

case "$USE_MONO_SERVER" in
    none)
 # Can't find anything
 echo "Either mono-apache-server or mono-apache-server2 needs "
 echo "to be installed."
 exit 1
 ;;
    mod-mono-server)
 echo "Using mono-apache-server..."
 sed 's@^Include.*$@Include /etc/mono-server/mono-server-hosts.conf@' \
     < $MONO_CONF > $tempfile
 cp -f $tempfile $MONO_CONF
 rm -f $tempfile
 ;;
    mod-mono-server2)
 echo "Using mono-apache-server2..."
 sed 's@^Include.*$@Include /etc/mono-server2/mono-server2-hosts.conf@'\
     < $MONO_CONF > $tempfile
 cp -f $tempfile $MONO_CONF
 rm -f $tempfile
 ;;
esac

Revision history for this message
Ralph Janke (txwikinger) wrote :

Could not reproduce this on hardy

description: updated
description: updated
Changed in mod-mono:
assignee: nobody → txwikinger
status: New → Incomplete
Revision history for this message
Ralph Janke (txwikinger) wrote :

I can reproduce this on gutsy as well as on hardy.

However, it seems to me that the error is just displayed and the installation is nevertheless continued and successfully completed.

Changed in mod-mono:
importance: Undecided → Low
status: Incomplete → Confirmed
Revision history for this message
Jo Shields (directhex) wrote :

Fixed many moons ago

Changed in mod-mono (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.