When installing aegir2-hostmaster for Ubuntu 14.04 and apache 2.4 the postinst fails.

The error message in console is:

Task verify was added to the queue. Next queue run is 11:02:34+0200, [status]
server time is 11:01:46+0200.
ln: failed to create symbolic link ‘/etc/apache2/conf.d/aegir.conf’: No such file or directory
Considering dependency setenvif for ssl:
Module setenvif already enabled
Considering dependency mime for ssl:
Module mime already enabled
Considering dependency socache_shmcb for ssl:
Enabling module socache_shmcb.
Enabling module ssl.
See /usr/share/doc/apache2/README.Debian.gz on how to configure SSL and create self-signed certificates.
Enabling module rewrite.
To activate the new configuration, you need to run:
  service apache2 restart
apache2: Syntax error on line 216 of /etc/apache2/apache2.conf: Could not open configuration file /etc/apache2/conf-enabled/aegir.conf: No such file or d   ectory
Action 'graceful' failed.
The Apache error log may have more information.
dpkg: error processing package aegir2-hostmaster (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of aegir2:
 aegir2 depends on aegir2-hostmaster (>= 2.1); however:
  Package aegir2-hostmaster is not configured yet.

dpkg: error processing package aegir2 (--configure):
 dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
                                                                                                          Processing triggers for libc-bin (2.19-0ubuntu6   ...
Processing triggers for libapache2-mod-php5 (5.5.9+dfsg-1ubuntu4) ...
Processing triggers for ureadahead (0.100.0-16) ...
Errors were encountered while processing:
 aegir2-hostmaster
 aegir2
E: Sub-process /usr/bin/dpkg returned an error code (1)

The problem is that the aegir.conf file for apache is not created correctly for Apache2.4, because of an variable not set in the script.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

kristofferwiklund’s picture

Here is a patch for fixing it.

BWPanda’s picture

Status: Active » Reviewed & tested by the community

I had the same problem. Fixed it by manually applying the changes from the above patch to /var/lib/dpkg/info/aegir2-hostmaster.postinst

Thanks Kris!

marji’s picture

I can confirm this truble on a fresh ubuntu 14.04, when installing via:
$ sudo apt-get install aegir2

After the install fails, update /var/lib/dpkg/info/aegir2-hostmaster.postinst
and change the variable VARLIB to AEGIRHOME on line 139 (that's what the patch above does):
|| ln -sf $AEGIRHOME/config/$WEBSERVER.conf /etc/apache2/conf-enabled/aegir.conf

Then, run again:
$ sudo apt-get install aegir2
and it will complete sucessfully.

ShaneOnABike’s picture

I can also confirm that repairing this line made the install run smoothly.. thanks for the patch and hopefully we can see this deployed!

helmo’s picture

Status: Reviewed & tested by the community » Fixed

Thanks

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

ryanbarkley’s picture

I noticed that the changes above have been committed, but I just had the same issue on a fresh install. The above fix worked for me, so maybe it hasn't made it into a release yet?

kristofferwiklund’s picture

Have you run the dev-version of Provision? Because the code is committed to the dev branch but no new release has been built.

ryanbarkley’s picture

No I was pulling from the main branch. That must be what it was. Thanks.

mjh2901’s picture

I just followed Marji's instructions and the installed finished perfectly. Hopefully the patch will be applied to the main branch soon.