This question about Installation of Foswiki: Answered
Debian install fails with /foswiki.postinst: 211: apache-modconf: not found
I attempted to install Foswiki from the debian packages.
running Ubuntu 8.04 with apache2
The installation went fine, until I was asked for the apache user password. I had no idea (the machine was pre-configured) so I guessed nothing, just hit return. The installation continued and resulted in:
...
Setting up foswiki (1.0.0-1) ...
/var/lib/dpkg/info/foswiki.postinst: 211: apache-modconf: not found
dpkg: error processing foswiki (--configure):
subprocess post-installation script returned error exit status 127
Errors were encountered while processing:
foswiki
E: Sub-process /usr/bin/dpkg returned an error code (1)
make: *** [foswiki] Error 100
root@tinkerbell:/home/configure#
I thought it might be caused by an incorrect password. So I removed foswiki with
apt-get remove foswiki
Then I changed that
www-data
password to one I knew (as root)
Then I re-ran
apt-get install foswiki
. However, no questions are asked this time. (There were three the first time). And the error remains.
Googling has confused me further.
apache-modconf
appears to be an
apache 1.3
thing. And it is true that I don't have it. I tried
apt-get -s install apache-modconf
With the result:
E: Couldn't find package apache-modconf
I am capable to install from the tarball, but I Iike the Debian way. Hopefully this question helps improve the install kit.
Had a further look at the code and found (line numbers are mine. Don't have much options on a remote login):
1 servers="apache apache-perl apache-ssl apache2"
2 for server in $servers; do
3 if [ -e /etc/$server/conf.d ]; then
4 includefile=/etc/foswiki/apache.conf
5 if [ -e /etc/$server/conf.d/foswiki.conf ]; then
6 rm -f /etc/foswiki/$server-conf.d-foswiki.conf_o
ld
7 mv /etc/$server/conf.d/foswiki.conf /etc/foswiki
/$server-conf.d-foswiki.conf_old
8 fi
9 ln -s $includefile /etc/$server/conf.d/foswiki.conf
10 if [ $server = "apache2" ]; then
11 a2enmod authn_file
12 a2enmod rewrite
13 else
14 apache-modconf $server enable authn_file
15 apache-modconf $server enable rewrite
16 fi
17 fi
18 done
Line two loops over a collection of servers and checks whether they exist by checking for the existence of
/etc/$server/conf.d
Ha, and
/etc/apache/conf.d
exists on my machine, and has some stuff in there. All of it copied in
/etc/apache2/conf.d
Since I don't use it, I renamed it to
/etc/apache/conf.d.OBSOLETE
and re-ran the install.
It worked
http:/192.168.1.156/cgi-bin/foswiki/view
displayed the
Main
web.
And I got access to configure without a password. So my empty password on the first install appears to have worked.
Not sure how one can prevent the 2 issues described above, but it appears there is room for improvement in the install script.
No doubt about it. If you can translate what requires doing into real tasks in the Tasks web, then hopefully we can get them addressed.
--
CrawfordCurrie - 14 Feb 2009
Added
Tasks.Item1087. The issue about the question I cannot reproduce.
--
BramVanOosterhout - 15 Feb 2009
resolved int the 1.0.4 pacakge
--
SvenDowideit - 20 Mar 2009