mp2: Error -- Can't locate Apache2.pm in @INC
[prev]
[thread]
[next]
[Date index for 2004/11/30]
Apparently we're not quite there yet. See the report for details. Note
that I am including the bug report because it might have useful details, not
because this is necessarily a bug.
-------------8<---------- Start Bug Report ------------8<----------
1. Problem Description:
I am trying to get mod_perl 2 working by following the instructions in
"Getting your feet wet with mod perl." I can configure, make, make test and
make install without any problems and then add
LoadModule perl_module modules/mod_perl.so
to http.conf and start Apache 2 successfully. However, I encounter a
problem when I try to add
PerlModule Apache2.
If I do this, Apache quits unexpectedly and in the error log I see:
---- snip ----
[Mon Nov 29 20:47:04 2004] [error] Can't locate Apache2.pm in @INC (@INC
contains: /usr/lib/perl/5.6.1 /usr/share/perl/5.6.1
/usr/local/lib/perl/5.6.1 /usr/local/share/perl/5.6.1 /usr/local/share/perl
/usr/lib/perl5 /usr/share/perl5 /usr/share/perl5 . /usr/local/apache/
/usr/local/apache/lib/perl) at (eval 2) line 3.\n
[Mon Nov 29 20:47:04 2004] [error] Can't load Perl module Apache2 for server
192.168.1.3:0, exiting...
---- snip ----
Since /usr/local/apache/lib/perl is in @INC and the modules needed seem to
be in blib/lib, I tried
cp -r blib/lib/* /usr/local/apache/lib/perl
and restarted Apache. This gets me past "PerlModule Apache2" and Apache is
up and serving pages.
However, when I move onto the next step and add registry scripts with
Alias /perl/ /usr/local/apache/lib/perl
<Location /perl/>
SetHandler perl-script
PerlResponseHandler ModPerl::Registry
PerlOptions +ParseHeaders
Options +ExecCGI
</Location>
Apache reports an internal server error when I try to load the test page,
and the error log shows:
---- snip ----
[Mon Nov 29 21:06:18 2004] [error] [client 192.168.1.2] failed to resolve
handler `ModPerl::Registry': Can't locate loadable object for module
Apache::Response in @INC (@INC contains: /usr/lib/perl/5.6.1
/usr/share/perl/5.6.1 /usr/local/lib/perl/5.6.1 /usr/local/share/perl/5.6.1
/usr/local/share/perl /usr/lib/perl5 /usr/share/perl5 /usr/share/perl5 .
/usr/local/apache/ /usr/local/apache/lib/perl) at
/usr/local/apache/lib/perl/Apache/XSLoader.pm line 30\nCompilation failed in
require at /usr/local/apache/lib/perl/ModPerl/RegistryCooker.pm line
29.\nBEGIN failed--compilation aborted at
/usr/local/apache/lib/perl/ModPerl/RegistryCooker.pm line 29.\nCompilation
failed in require at (eval 4) line 3.\n\t...propagated at
/usr/share/perl/5.6.1/base.pm line 62.\nBEGIN failed--compilation aborted at
/usr/local/apache/lib/perl/ModPerl/Registry.pm line 25.\nCompilation failed
in require at (eval 3) line 3.\n
---- snip ----
There actually is a file named
/usr/local/apache/lib/perl/Apache/Response.pm, so I am not sure what this
error message means. Any hints or suggestions? I installed mod_perl 2.0
with the following commands:
perl Makefile.PL MP_APXS=/usr/local/apache/bin/apxs
make
make test
make install
Any ideas about where I might have gone wrong?
2. Used Components and their Configuration:
*** mod_perl version 1.9917
*** using /mnt/usr-local/mod_perl-1.99_17/lib/Apache/BuildConfig.pm
*** Makefile.PL options:
MP_APR_LIB => aprext
MP_APXS => /usr/local/apache/bin/apxs
MP_COMPAT_1X => 1
MP_GENERATE_XS => 1
MP_LIBNAME => mod_perl
MP_USE_DSO => 1
*** /usr/local/apache/bin/httpd -V
Server version: Apache/2.0.52
Server built: Nov 26 2004 02:58:27
Server's Module Magic Number: 20020903:9
Architecture: 32-bit
Server compiled with....
-D APACHE_MPM_DIR="server/mpm/prefork"
-D APR_HAS_SENDFILE
-D APR_HAS_MMAP
-D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
-D APR_USE_SYSVSEM_SERIALIZE
-D APR_USE_PTHREAD_SERIALIZE
-D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
-D APR_HAS_OTHER_CHILD
-D AP_HAVE_RELIABLE_PIPED_LOGS
-D HTTPD_ROOT="/usr/local/apache"
-D SUEXEC_BIN="/usr/local/apache/bin/suexec"
-D DEFAULT_PIDLOG="logs/httpd.pid"
-D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
-D DEFAULT_LOCKFILE="logs/accept.lock"
-D DEFAULT_ERRORLOG="logs/error_log"
-D AP_TYPES_CONFIG_FILE="conf/mime.types"
-D SERVER_CONFIG_FILE="conf/httpd.conf"
*** (apr|apu)-config linking info
-L/usr/local/apache/lib -lapr-0 -lrt -lm -lcrypt -lnsl -lpthread -ldl
-L/usr/local/apache/lib -laprutil-0 -lgdbm -lexpat
*** /usr/bin/perl -V
Summary of my perl5 (revision 5.0 version 6 subversion 1) configuration:
Platform:
osname=linux, osvers=2.4.2_hhl20, archname=ppc-linux
uname=''
config_args=''
hint=previous, useposix=true, d_sigaction=define
usethreads=undef use5005threads=undef useithreads=undef
usemultiplicity=undef
useperlio=undef d_sfio=undef uselargefiles=undef usesocks=undef
use64bitint=undef use64bitall=undef uselongdouble=undef
Compiler:
cc='ppc_82xx-gcc', ccflags ='-fno-strict-aliasing',
optimize='-O2',
cppflags='-fno-strict-aliasing'
ccversion='', gccversion='2.95.3 20010315 (release/MontaVista)',
gccosandvers=''
intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=4321
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=8
ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t',
lseeksize=4
alignbytes=4, usemymalloc=n, prototype=define
Linker and Libraries:
ld='ppc_82xx-gcc', ldflags =' '
libpth=/lib /usr/lib
libs=-lnsl -lgdbm -ldbm -ldb -ldl -lm -lc -lcrypt -lutil
perllibs=-lnsl -ldl -lm -lc -lcrypt -lutil
libc=/lib/libc-2.2.3.so, so=so, useshrplib=false, libperl=libperl.a
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic'
cccdlflags='-fPIC', lddlflags='-shared '
Characteristics of this binary (from libperl):
Compile-time options:
Built under linux
Compiled at Apr 29 2002 19:39:29
%ENV:
PERL_LWP_USE_HTTP_10="1"
@INC:
/usr/lib/perl/5.6.1
/usr/share/perl/5.6.1
/usr/local/lib/perl/5.6.1
/usr/local/share/perl/5.6.1
/usr/local/share/perl
/usr/lib/perl5
/usr/share/perl5
/usr/share/perl5
.
*** Packages of interest status:
Apache::Request: -
CGI : 2.752
LWP : -
mod_perl : -
3. This is the core dump trace: (if you get a core dump):
[CORE TRACE COMES HERE]
This report was generated by t/REPORT on Tue Nov 30 01:34:41 2004 GMT.
-------------8<---------- End Bug Report --------------8<----------
--
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html