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

Esteemed monks,

Please excuse me if this is a little OT.

I have been trying to install Apache::Request from CPAN. It requires Apache::Test, when I try to build Apache::Test I get the following:

/usr/bin/make -j3 -- OK Running make test /usr/local/bin/perl -Iblib/arch -Iblib/lib \ t/TEST -clean *** setting ulimit to allow core files ulimit -c unlimited; t/TEST -clean APACHE_GROUP= APXS= APACHE_PORT= APACHE_USER= APACHE= \ /usr/local/bin/perl -Iblib/arch -Iblib/lib \ t/TEST -verbose=0 *** setting ulimit to allow core files ulimit -c unlimited; t/TEST -verbose=0 *** root mode: changing the files ownership to 'nobody' (99:99) *** su -m nobody -c '/usr/local/bin/perl -e "print -r q{/root/.cpan/bu +ild/Apache-Test-1.05/t} && -w _ && -x _ ? q{OK} : q{NOK}"' *** result: NOK !!! You are running the test suite under user 'root'. Apache cannot spawn child processes as 'root', therefore we attempt to run the test suite with user 'nobody' (99:99). The problem is that the path: /root/.cpan/build/Apache-Test-1.05/t must be 'rwx' by user 'nobody', so Apache can read and write under tha +t path. There several ways to resolve this issue. For example move '/root/.cpan/build/Apache-Test-1.05/t' to '/tmp/' and repeat the 'make + test' phase. You can test whether the location is good by running the following tes +t: % su -m nobody -c '/usr/local/bin/perl -e "print -r q{/root/.cpan/bu +ild/Apache-Test-1.05/t} && -w _ && -x _ ? q{OK} : q{NOK}"' make: *** [run_tests] Error 9 /usr/bin/make test -- NOT OK Running make install make test had returned bad status, won't install without force cpan>
Now, yes, I am running the install under root. But I went and chmod'ed the directories and chown'ed them and to no availa it would seem.

Does anybody have any suggestions?

jdtoronto

Replies are listed 'Best First'.
Re: Trouble installing Apache::Test as root.
by jdtoronto (Prior) on Nov 08, 2003 at 03:39 UTC
    Esteemed colleagues,

    I get to answer my own question!

    The secret is to NOT try to do it with CPAN. Two things happen. Firstly, during the make test portion the script will attempt to start the Apache server. If it cannot find it you need to manually enter the information. By being able to do this in a manual install I was able to complete the tests.

    Secondly, you still need to be root to install, so you just do an 'su' and run the make install as root.

    The same sort of problem occurs when installing libapreq.pl, and Apache::Request.

    Of course, YMMV! jdtoronto

      Am I just ignorant and crochety, or is it awefully antisocial of the authors of these modules to put things on CPAN without first fixing them to be able to be installed via CPAN?


      $;=sub{$/};@;=map{my($a,$b)=($_,$;);$;=sub{$a.$b->()}} split//,".rekcah lreP rehtona tsuJ";$\=$ ;->();print$/
        I'd say you're ignorant :)(don't know about crotchety) Last I checked you could do a force-install, so the module is installable.

        However, as a cpan-tester I do believe the author should use MakeMaker's prompt function to prompt for a path to httpd during Makefile.PL, and skip the tests if a httpd cannot be found.

        MJD says "you can't just make shit up and expect the computer to know what you mean, retardo!"
        I run a Win32 PPM repository for perl 5.6.x and 5.8.x -- I take requests (README).
        ** The third rule of perl club is a statement of fact: pod is sexy.