These are the steps I took to install apache-perl under Ubuntu 7.04:
- download the Apache source (apache_1.3.37.tar.gz) from http://httpd.apache.org/download.cgi
- download the source for mod_perl (mod_perl-1.0-current.tar.gz) from http://perl.apache.org/download/index.html
- unpack both apache and mod_perl into
/usr/src. You should now have/usr/src/apache_1.3.37and/usr/src/mod_perl-1.30 - change the link for
/bin/shto/bin/bash:rm -f /bin/sh; ln -s /bin/bash /bin/sh1 - install libc6-dev:
sudo aptitude install libc6-dev2 - create a link to libperl:
sudo ln -s /usr/lib/libgdbm.so.3.0.0 /usr/lib/libgdbm.so3 - 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 - cd to
/usr/src/mod_perl-1.30and runperl Makefile.PL APACHE_SRC=../apache_1.3.37/src NO_HTTPD=1 USE_APACI=1 PREP_HTTPD=1 EVERYTHING=1 makesudo make install- cd back to
/usr/src/apache_1.3.37and 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 - download libapreq (libapreq-1.33.tar.gz) from and extract into
/usr/src4 - cd to
/usr/src/libapreq-1.33 perl Makefile.PLmakesudo make install- you should now be able to start apache-perl with
sudo /usr/sbin/apache-perlctl start
Notes:
- 1 link to
/bin/sh -
/bin/shis linked to/bin/dashand 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 withrm -f /bin/shand recreating it withln -s /bin/bash /bin/shto point to/bin/bashwill 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 withsudo aptitude install libc6-devsorts 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 calledlibperl.so.5.8.8, so simply link it to the filename that the makefile is expecting to find:sudo ln -s /usr/lib/libgdbm.so.3.0.0 /usr/lib/libgdbm.so - 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
Advertisements
[…] 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 |