Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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/ 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/ line 8.\nBEGIN failed--compilation aborted at /usr/local/share/perl/5.10.0/Apache2/ 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.

share|improve this question
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/ in @INC" – Skyline Sep 1 '11 at 11:25
up vote 0 down vote accepted

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

share|improve this answer
C'est ça. The installation was corrupted. – Skyline Sep 30 '11 at 13:10

You could try


and check if it finds anything.

Otherwise, check what files are provided by the installed package

share|improve this answer
/usr/lib/perl5/site_perl/5.8.8/Apache2/REST/ /usr/lib/perl5/vendor_perl/5.8.8/HTTP/ /root/.cpan/build/Apache2-REST-0.07/lib/Apache2/REST/ /root/.cpan/build/Apache2-REST-0.07/blib/lib/Apache2/REST/ /root/.cpan/build/libapreq2-2.13/glue/perl/lib/Apache2/ /root/.cpan/build/libapreq2-2.13/glue/perl/xsbuilder/APR/Request/ 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]: *** [] 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 posting your answer, you agree to the privacy policy and terms of service.

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