mod_perl error: Can't locate object method "boot"

Michael Schwendt fedora at wir-sind-cool.org
Sat May 15 20:43:07 UTC 2004


On Sat, 15 May 2004 21:55:08 +0200
Gunnar Hjalmarsson <noreply at gunnar.xxx> wrote:

> Gunnar Hjalmarsson wrote:
> > running a simple "Hello World" script resulted in "Internal Server
> > Error" and this complaint in the error log:
> > 
> > failed to resolve handler `ModPerl::Registry'
> > Can't locate object method "boot" via package "mod_perl" at 
> > /usr/lib/perl5/site_perl/5.8.1/i386-linux-thread-multi/Apache/Log.pm
> > line 6.
> > Compilation failed in require at 
> > /usr/lib/perl5/vendor_perl/5.8.1/i386-linux-thread-multi/ModPerl/RegistryCooker.pm
> > line 21.
> 
> I have made some progress. This is the content of @INC if you run a
> Perl program as a plain CGI script:
> 
>    /usr/lib/perl5/5.8.1/i386-linux-thread-multi
>    /usr/lib/perl5/5.8.1
>    /usr/lib/perl5/site_perl/5.8.1/i386-linux-thread-multi
>    /usr/lib/perl5/site_perl/5.8.1
>    /usr/lib/perl5/site_perl
>    /usr/lib/perl5/vendor_perl/5.8.1/i386-linux-thread-multi
>    /usr/lib/perl5/vendor_perl/5.8.1
>    /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi
>    /usr/lib/perl5/vendor_perl/5.8.0
>    /usr/lib/perl5/vendor_perl
>    /usr/lib/perl5/5.8.1/i386-linux-thread-multi
>    /usr/lib/perl5/5.8.1
> 
> There are Apache/Log.pm files (not identical) both in
> /usr/lib/perl5/site_perl/5.8.1/i386-linux-thread-multi and in
> /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi. The file
> that should be loaded is the one at the latter location. I have no
> idea why things have been set up that way, but that's how it is.
> 
> What I did was loading a startup.pl file when starting the server with
> the following line:
> 
>    use lib '/usr/lib/perl5/vendor_perl/5.8.1/i386-linux-thread-multi';
> 
> By doing so, that directory was made the first directory in @INC when
> running a program under mod_perl, and the correct version of
> Apache/Log.pm got loaded.
> 
> To me, this appears to be a decent solution. However, I feel that I'm
> out on deep water here, and if somebody is able to share some insight,
> it would be greatly appreciated.

Well, who put the other version into the site_perl location? Perl is set up, so
site installs override vendor installs. Since the module in the vendor directory
is working correctly, get rid of the one that doesn't work correctly. Find out
where it comes from. Run things like (but not limited to):

  rpm -qf /usr/lib/perl5/site_perl/5.8.1/i386-linux-thread-multi/Apache/Log.pm

Maybe you've installed something from source some time before.

-- 
Fedora Core release 2 (Tettnang) - Linux 2.6.5-1.358





More information about the redhat-list mailing list