Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: CPAN: Install of Apache2::Request failed

by jbullock35 (Hermit)
on Aug 13, 2009 at 22:48 UTC ( #788467=note: print w/ replies, xml ) Need Help??


in reply to CPAN: Install of Apache2::Request failed

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


Comment on Re: CPAN: Install of Apache2::Request failed
Select or Download Code
Re: CPAN: Install of Apache2::Request failed
by aidan (Initiate) on Aug 27, 2009 at 11:19 UTC

    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.

      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

        Thanks so much - I guess I'll never know why I couldn't install via CPAN, but using cpanplus and your manual install technique, it seems to have worked.

        Thanks.

        Hello Monks. New here as a monk but have been a reader in the past...

        I ran in to this problem too. Having had a look at the Makefile.PL sourcecode, I see the problem is due to the way Makefile.PL interfaces with configure. I've sent the following message to apreq-dev@httpd.apache.org:

        ----->8-------

        I've been trying to install libapreq2-2.12 using the following command:

        perl Makefile.PL INSTALLDIRS=vendor --with-apache2-apxs=/blah

        This fails because Makefile.PL assumes that options passed to it that are not recognised are Perl options rather than Makefile.PL options (line 54).

        This results in configure being invoked as:

        ./configure --enable-perl-glue --with-perl-opts=INSTALLDIRS=vendor --w +ith-apache2-apxs=/blah/apxs --with-perl=/blah/perl

        This leads to the configure script trying to run the following command at line 19493:

        perl INSTALLDIRS=vendor build/version_check.pl

        that then fails...

        Does anyone think it would be possible to enable the Makefile.PL INSTALLDIRS=vendor for this package? I appreciate that the distribution uses a somewhat non-standard way to install the modules.

        -----8<------

        I'll post anything I hear back about this question. In the meantime I've just not passed the INSTALLDIRS option to Makefile.PL - not ideal in my situation, but at least it allows me to install the modules.

        Simon

      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

        How can I set such that the Apache2/Cookie.pm, Request.pm and Upload.pm would be installed to /some/site instead of the lib location of the perl binary (defined in --with-perl above). using --prefix did not work. It tried to install to lib directory of the perl specified by --with-perl. -Indra
      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
        I went through the tedious procedure for installing Apache2::Request by doing the whole thing in the source directory of libapreq2* and thought do post this with more details to help others in the similiar situation. 1. installing apache2-threaded-dev for getting "apxs2" binary installed. I also have to change the "apxs" binary name in "configure" script to "apxs2" to pass the configuration process. 2. installing apache2-mod-perl2-dev for problems encountered during the "make" process where mod_perl.h, modperl_perl_unembed.h and other header files are needed. 3. installing ExtUtils::XSBuilder::ParseSource is pretty staight forward and can be done in cpan environment without problem. Thanks

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://788467]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (10)
As of 2014-12-19 04:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (70 votes), past polls