These are the steps I took to install apache-perl under Ubuntu 7.04:

  1. download the Apache source (apache_1.3.37.tar.gz) from
  2. download the source for mod_perl (mod_perl-1.0-current.tar.gz) from
  3. unpack both apache and mod_perl into /usr/src. You should now have /usr/src/apache_1.3.37 and /usr/src/mod_perl-1.30
  4. change the link for /bin/sh to /bin/bash: rm -f /bin/sh; ln -s /bin/bash /bin/sh1
  5. install libc6-dev: sudo aptitude install libc6-dev2
  6. create a link to libperl: sudo ln -s /usr/lib/ /usr/lib/libgdbm.so3
  7. cd to /usr/src/apache_1.3.37 and run configure: ./configure --prefix=/usr/local/apache-perl --target=apache-perl --with-perl=/usr/bin/perl --libexecdir=/usr/lib/apache-perl --logfiledir=/var/log/apache-perl --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc/apache-perl --activate-module=src/modules/perl/libperl.a --disable-module=auth_db --disable-module=autoindex --disable-module=cgi --enable-module=expires --enable-module=rewrite --enable-module=headers --enable-shared=access --enable-shared=alias --enable-shared=auth --enable-shared=dir --enable-shared=expires --enable-shared=headers --enable-shared=log_config --enable-shared=mime --enable-shared=mime_magic --enable-shared=negotiation --enable-shared=rewrite --enable-shared=setenvif --enable-shared=status
  8. cd to /usr/src/mod_perl-1.30 and run perl Makefile.PL APACHE_SRC=../apache_1.3.37/src NO_HTTPD=1 USE_APACI=1 PREP_HTTPD=1 EVERYTHING=1
  9. make
  10. sudo make install
  11. cd back to /usr/src/apache_1.3.37 and run the configure again: ./configure --prefix=/usr/local/apache-perl --target=apache-perl --with-perl=/usr/bin/perl --libexecdir=/usr/lib/apache-perl --logfiledir=/var/log/apache-perl --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc/apache-perl --activate-module=src/modules/perl/libperl.a --disable-module=auth_db --disable-module=autoindex --disable-module=cgi --enable-module=expires --enable-module=rewrite --enable-module=headers --enable-shared=access --enable-shared=alias --enable-shared=auth --enable-shared=dir --enable-shared=expires --enable-shared=headers --enable-shared=log_config --enable-shared=mime --enable-shared=mime_magic --enable-shared=negotiation --enable-shared=rewrite --enable-shared=setenvif --enable-shared=status
  12. download libapreq (libapreq-1.33.tar.gz) from and extract into /usr/src4
  13. cd to /usr/src/libapreq-1.33
  14. perl Makefile.PL
  15. make
  16. sudo make install
  17. you should now be able to start apache-perl with sudo /usr/sbin/apache-perlctl start


1 link to /bin/sh
/bin/sh is linked to /bin/dash and so when you run apache-perl configure it exits with the following error message:

Configuring for Apache, Version 1.3.37
+ Warning: Your 'echo' command is slightly broken.
+ It interprets escape sequences per default. We already
+ tried 'echo -E' but had no real success. If errors occur
+ please set the SEO variable in 'configure' manually to
+ the required 'echo' options, i.e. those which force your
+ 'echo' to not interpret escape sequences per default.

Simply removing the link with rm -f /bin/sh and recreating it with ln -s /bin/bash /bin/sh to point to /bin/bash will sort this out.
2 libc6-dev
A brand new installation won’t have libc6-dev installed, so apache-perl configure fails with the following error:

======== Error Output for sanity check ========
cd ..; gcc -DLINUX=22 -DTARGET=\"apache-perl\" -DNO_DBM_REWRITEMAP -DUSE_HSREGEX -DUSE_EXPAT -I./lib/expat-lite `./apaci` -o helpers/dummy helpers/dummy.c -lm
/usr/bin/ld: crt1.o: No such file: No such file or directory
collect2: ld returned 1 exit status
make: *** [dummy] Error 1
============= End of Error Report =============

Installing libc6-dev with sudo aptitude install libc6-dev sorts this one out.
3 libperl
When you run configure for mod_perl it fails with the message:

/usr/bin/ld: cannot find -lperl

It is there, it’s just called, so simply link it to the filename that the makefile is expecting to find: sudo ln -s /usr/lib/ /usr/lib/
4 libapreq
According to the install docs, the libapreq package is notoriously difficult to compile under CPAN, so doing it at this point while you’re busy doing all the other compiling saves you some headaches later

Back to Installing Socialtext


1 Comment »

  1. […] Go read the responses and voice your opinion here.  I’ve got better things to do.  Like write about what I had for breakfast. […]

    Pingback by Bullard who? « MediaFrenzy — May 7, 2007 @ 9:42 am | Reply

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

Create a free website or blog at

%d bloggers like this: