I am running Apache/2.2.9 on SLES 10 and want to use Apache2::REST.

I installed it using cpan and added the Handler and the configuration stuff. When I try to start Apache (apache2ctl start), it says:

[Thu Sep 01 11:13:30 2011] [warn] module apreq_module is already loaded, skipping

[Thu Sep 01 11:13:30 2011] [warn] module perl_module is already loaded, skipping

The error.log tells me:

[Thu Sep 01 10:43:06 2011] [error] Can't locate Apache2/Request.pm in @INC (@INC contains: /usr/lib/perl5/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/5.8.8 /usr/lib/perl5/site_perl/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.8/usr/lib/perl5/vendor_perl . /etc/apache2) at /usr/local/share/perl/5.10.0/Apache2/REST.pm line 8.\nBEGIN failed--compilation aborted at /usr/local/share/perl/5.10.0/Apache2/REST.pm line 8.\nCompilation failed in require at (eval 5) line 3.\n

[Thu Sep 01 10:43:06 2011] [error] Can't load Perl module Apache2::REST for server servername:0, exiting...

I get the same error on SLES 10. But there I cannot even install apreq2.

  • It means that the Apache2::REST module is not installed properly. Check with instmodsh or $ perl -MApache2::REST -e "print \"Module installed\\n\";". – quanta Sep 1 '11 at 9:51
  • instmodsh finds the following modules: Apache2::REST Class::AutoAccess ExtUtils::MakeMaker ExtUtils::XSBuilder JSON::XS Perl YAML common::sense ... $ perl -MApache2::REST -e "print \"Module installed\\n\";" still says "Can't locate Apache2/Request.pm in @INC" – Skyline Sep 1 '11 at 11:25

It appears you need to install libapreq2 That, or the existing installation is corrupted. The ''already loaded'' messages are immaterial.

  • C'est ça. The installation was corrupted. – Skyline Sep 30 '11 at 13:10

You could try

locate Request.pm

and check if it finds anything.

Otherwise, check what files are provided by the installed package

  • /usr/lib/perl5/site_perl/5.8.8/Apache2/REST/Request.pm /usr/lib/perl5/vendor_perl/5.8.8/HTTP/Request.pm /root/.cpan/build/Apache2-REST-0.07/lib/Apache2/REST/Request.pm /root/.cpan/build/Apache2-REST-0.07/blib/lib/Apache2/REST/Request.pm /root/.cpan/build/libapreq2-2.13/glue/perl/lib/Apache2/Request.pm /root/.cpan/build/libapreq2-2.13/glue/perl/xsbuilder/APR/Request/Request.pm It seems to be in a cpan-folder but not in really installed?! – Skyline Sep 1 '11 at 11:47
  • when i start cpan and type in "install Apache2::Request" there is a lot of gcc stuff and in the end it says: ##################make[2]: *** [libapreq2.la] Error 1 make[2]: Leaving directory /root/.cpan/build/libapreq2-2.13/library' make[1]: *** [all] Error 2 make[1]: Leaving directory /root/.cpan/build/libapreq2-2.13/library' make: *** [all-recursive] Error 1 /usr/bin/make -- NOT OK Running make test Can't test without successful make Running make install make had returned bad status, install seems impossible – Skyline Sep 1 '11 at 12:09
  • Ok ... maybe you add add site_perl and vendor_perl to INC. Are you trying to compile it as root ? – Nikolaidis Fotis Sep 1 '11 at 12:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.