Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: CPAN: Install of Apache2::Request failed

by aidan (Initiate)
on Aug 27, 2009 at 11:19 UTC ( #791589=note: print w/replies, xml ) Need Help??


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

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.

Replies are listed 'Best First'.
Re^2: CPAN: Install of Apache2::Request failed
by Khen1950fx (Canon) on Aug 28, 2009 at 10:08 UTC
    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
Re^2: CPAN: Install of Apache2::Request failed
by Anonymous Monk on Aug 27, 2009 at 11:31 UTC
    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

Re^2: CPAN: Install of Apache2::Request failed
by Anonymous Monk on Jan 09, 2010 at 17:23 UTC
    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
        Hi, I've followed the instructions above but I still get an error when I try to install Apache2:: Request. I haven't modified the configure script to encompass the binary name change... perhaps that's where I'm going wrong. Can anyone tell me what line that change should be made on? At the moment I get the following error messages: ./configure: line 19467: apxs: command not found ./configure: line 19481: apxs: command not found ./configure: line 19485: apxs: command not found ./configure: line 19489: apxs: command not found ./configure: line 19489: apxs: command not found build/version_check.pl failed: no version_string found in '' for 'apache2'. configure: error: Bad apache2 binary (/)

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (5)
As of 2019-01-23 14:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    After Perl5, I'm mostly interested in:
































    Results (404 votes). Check out past polls.

    Notices?