You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Philip Mak <pm...@aaanime.net> on 2002/12/28 10:57:28 UTC
Why is my mod_perl's @INC different?
When I use perl from the command line, my @INC is this:
$ perl -e"print join(':', @INC)"
/usr/lib/perl5/5.6.1/i386-linux:/usr/lib/perl5/5.6.1:/usr/lib/perl5/site_perl/5.6.1/i386-linux:/usr/lib/perl5/site_perl/5.6.1:/usr/lib/perl5/site_perl/5.6.0:/usr/lib/perl5/site_perl:.
When I print @INC from a mod_perl script, it is this:
/home/mirror/global:/usr/lib/perl5/5.6.1/i686-linux:/usr/lib/perl5/5.6.1:/usr/lib/perl5/site_perl/5.6.1/i686-linux:/usr/lib/perl5/site_perl/5.6.1:/usr/lib/perl5/site_perl:.:/home/mirror/httpd/:/home/mirror/httpd/lib/perl
How did this happen? Why does my command line perl use i386-linux,
while my mod_perl uses i686-linux?
My problem is, any modules I install go into i386-linux. They're not
accessible to mod_perl. I need to install a new module for my site but
I can't access it in mod_perl.
I've tried adding "use lib qw(/usr/lib/perl5/5.6.1/i386-linux);" in
startup.pl, but then it makes Apache not start at all:
/usr/local/perlhttpd/bin/httpd: relocation error: /usr/lib/perl5/5.6.1/i386-linux/auto/Data/Dumper/Dumper.so: undefined symbol: perl_get_sv
/home/mirror/bin/apachectl start: httpd could not be started
Any idea what's going on here?
Re: Why is my mod_perl's @INC different?
Posted by pe...@elem.com.
> How did this happen? Why does my command line perl use i386-linux,
> while my mod_perl uses i686-linux?
Simple: they are compiled to use different installations of Perl. If you
want to unify them, you can find out what mod_perl is using and put it
first in your path (so that "perl" will run it) or you can replace one or
the other with a new compile.
- Perrin