nesto has asked for the wisdom of the Perl Monks concerning the following question:

Dear monks, I'm new in PERL and on this forum, and I hope someone can help me with the following problem: Installing Apache2::Request using CPAN fails on my system, Ubuntu 7.10. In the installation proces CPAN complains about:
CPAN: YAML loaded ok (v0.66) CPAN.pm: Going to build J/JO/JOESUF/libapreq2-2.08.tar.gz ./configure --enable-perl-glue --with-perl-opts="INSTALLDIRS=site" --w +ith-apache2-apxs="/usr/bin/apxs2" --with-perl="/usr/bin/perl" . . . Warning: No success on command[/usr/bin/perl Makefile.PL INSTALLDIRS=s +ite] JOESUF/libapreq2-2.08.tar.gz /usr/bin/perl Makefile.PL INSTALLDIRS=site -- NOT OK Running make test Make had some problems, won't test
apparently the "INSTALLDIRS" option does not work out. How to solve and be able to install the module?

Replies are listed 'Best First'.
Re: CPAN: Install of Apache2::Request failed
by perrin (Chancellor) on Dec 07, 2007 at 21:24 UTC
    You're not showing the actual error here, so it's hard to guess what went wrong. It might be simpler to forget the CPAN shell and just install the module manually by downloading it and then running make/make test/make install.
Re: CPAN: Install of Apache2::Request failed
by olus (Curate) on Dec 07, 2007 at 20:43 UTC
    You can try from the command line:
    apt-cache search mod_perl
    and then install the things you're interested in
    sudo apt-get install libapache2-mod-perl2
    That will install Apache2 modules.

    --
    olus
Re: CPAN: Install of Apache2::Request failed
by jbullock35 (Hermit) on Aug 13, 2009 at 22:48 UTC

    I had the same problem with Apache2::Request on CentOS 5.4. Installing mod_perl-devel made everything go smoothly:

      yum install mod_perl-devel
      cpan install Apache2::Request

      I'm having the same problem. (Also on Ubuntu 9.04 with Apache2 & mod_perl2)

      I've installed all these:

      libapache2-mod-perl2 libapache2-mod-perl2-dev apache2-prefork-dev libapreq2-dev libapreq2 libapache2-request-perl

      But I'm still seeing this:

      CPAN: File::Temp loaded ok (v0.18) CPAN.pm: Going to build J/JO/JOESUF/libapreq2-2.12.tar.gz perl: 5.10.0 ok mod_perl2: 2.000004 ok Apache::Test: 1.31 ok ExtUtils::MakeMaker: 6.42 ok ExtUtils::XSBuilder: 0.28 ok Test::More: 0.88 ok ./configure --enable-perl-glue --with-perl-opts="INSTALLDIRS=site" --w +ith-apache2-apxs="/usr/bin/apxs2" --with-perl="/usr/bin/perl" checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... no [snip] checking whether ln -s works... yes checking whether to enable maintainer-specific portions of Makefiles.. +. no Can't open perl script "INSTALLDIRS=site": No such file or directory configure: error: Bad apache2 binary (/usr/sbin/apache2) Warning: No success on command[/usr/bin/perl Makefile.PL INSTALLDIRS=s +ite] JOESUF/libapreq2-2.12.tar.gz /usr/bin/perl Makefile.PL INSTALLDIRS=site -- NOT OK Running make test Make had some problems, won't test Running make install Make had some problems, won't install

      Any pointers would be gratefully received, this is driving me nuts.

        You almost had it. I would run ./configure like this:

        ./configure --prefix=/some/site --enable-perl-glue --with-apache2-apxs=/usr/bin/apxs --with-perl=/usr/bin/perl

        This is suspicious Can't open perl script "INSTALLDIRS=site" INSTALLDIRS=site is an argument for Makefile.PL, not perl

        You should break out of CPAN, I think

        CPAN> look libapreq2
        or with cpanplus
        cpanp z libapreq2
        and run
        perl Makefile.PL make make test make install
        manually
        This problem has problem been solved but I ran into this situation on Debian. Whenever you run into problems installing Perl modules, the best thing to do is get out of CPAN and just read the errors. Here's the solution for getting Apache2::Request on Debian Lenny 64-bit. To get Apache2::Request to work I had to install the following using apt apt-get install apache2-threaded-dev libapache2-mod-perl2-dev And then I had to install the Perl Mod: ExtUtils::XSBuilder::ParseSource