6

I am having an infuriating time trying to get an install of apache with perl. I am following the instructions on the mod_perl site located here: http://perl.apache.org/docs/2.0/user/install/install.html

I get as far as the part where it asks me to run this command, but I get an error:

$ perl Makefile.PL MP_APXS=/usr/local/httpd/prefork/bin/apxs
Reading Makefile.PL args from @ARGV
   MP_APXS = /usr/local/httpd/prefork/bin/apxs
no conflicting prior mod_perl version found - good.
Configuring Apache/2.4.2 mod_perl/2.0.7 Perl/v5.12.3
[  error] Can't find apr include/ directory,
[  error] use MP_APR_CONFIG=/path/to/apr-config

I ran the commands they suggested for installing apache to install my apache:

  $ ./configure --prefix=$HOME/httpd/prefork --with-mpm=prefork
  $ make && make install

But I am not sure where this apr-config thing is supposed to be as it doesn't appear to be anywhere in my apache2 folder.

If it might be an issue, I am using Mac OS X 10.7.3. I know an apache server comes with Mac OS X, but I need to do this install on a different computer from the ground up, so I have to start this whole install from the ground up on my computer.

Thanks ahead of time for any help you can provide.

kand
  • 2,268
  • 6
  • 31
  • 43
  • 1
    Im not aware of **anybody** who managed to run `mod_perl-2.0.[678]` with `Apache 2.4.x` in any real world scenario. See [mod_perl 2.0.7 Release Notes](http://perl.apache.org/dist/mod_perl-2.0-current/Changes). – rubber boots Jun 20 '12 at 23:08
  • 1
    As of 2012-06-21, there is no mod_perl 2.0.8 – daxim Jun 20 '12 at 23:15
  • 1
    @rubber boots: if there was a particular part of the release notes you meant to reference, it would be good to know what it was – ysth Jun 21 '12 at 01:04
  • 1
    @ysth 2.4 internals brought some fundamental changes (even from dev-2.3), it would have **surely been mentioned** in the R.N. if 2.4.x is finally supported. (Maybe surrounded by some ascii art.) Maybe there should have been a fork 2.0.x <---> 2.4.x as was in 1.x to 2.x. Maybe not. I'm not involved but follow the dev mailing lists. – rubber boots Jun 21 '12 at 07:47
  • 1
    Link is dead - this is exactly what's wrong with posting link-only answers.. – Jesse May 01 '13 at 16:17

3 Answers3

7

When mod_perl 2.0.8 comes out, I hope that it gets finally httpd 2.4 support, because the current versions surely don't have.

When you fix your initial problems, you will eventually get stuck at ‘conn_rec’ has no member named ‘remote_ip’. Delete httpd 2.4 and use 2.2 meanwhile.

daxim
  • 39,270
  • 4
  • 65
  • 132
3

You need to include the path to binary executable file apr-1-config. Run the below command

perl Makefile.PL MP_APXS=/usr/local/apache2/bin/apxs MP_APR_CONFIG=/usr/local/apr/bin/apr-1-config

It worked for me..Hope the same for you too.

Werner Henze
  • 16,404
  • 12
  • 44
  • 69
1

On Lion here, my APR include directory seems to be /usr/include/apr-1, but it already came with mod_perl.

$ find / -name apr*
/usr/include/apr-1
...

$ find / -name mod_perl.so
/usr/libexec/apache2/mod_perl.so

If you have the .so already you should be able to just add in your config file:

LoadModule perl_module libexec/apache2/mod_perl.so
Dondi Michael Stroma
  • 4,668
  • 18
  • 21