Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Can't locate DBI.pm in @INC

Quote Reply
Can't locate DBI.pm in @INC
recently moved to a new server. nothing was working, so I installed speedycgi. now I get:
"A fatal error has occured:
Can't locate DBI.pm in @INC "


I did a locate from command line and get this:
# locate DBI.pm
/home/.cpan/Bundle/DBI.pm
/usr/lib/perl5/site_perl/5.8.1/i686-linux/DBI.pm
/usr/lib/perl5/site_perl/5.8.1/i686-linux/Bundle/DBI.pm

so the problem I think is that @INC isn't looking in the right place?
this from lsql debugging on page giving error:
System Information
======================================
Perl Version: 5.008
Links SQL Version: 2.1.2
Persistant Env: mod_perl (0) SpeedyCGI (1)
@INC =
../..
/home/fotu/public_html/cgi-bin/directory/admin
/usr/lib/perl5/5.8.0/i386-linux-thread-multi
/usr/lib/perl5/5.8.0
/usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi
/usr/lib/perl5/site_perl/5.8.0
/usr/lib/perl5/site_perl
/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


what do I do about this? I actually tried copying DBI.pm from /i686-linux into /i386-linux and got a little farther, but received new errors about not finding a loadable object. so I deleted the copied file and am back where I started.

Please help. What should I do? Install dbi in a new place? how do I do that? I can follow instructions Smile

Thanks,
Will
Quote Reply
Re: [wwwill] Can't locate DBI.pm in @INC In reply to
Hi. I'm not normally very good with this kinda stuff.. but I did notice something in your post.

Quote:
/home/fotu/public_html/cgi-bin/directory/admin
/usr/lib/perl5/5.8.0/i386-linux-thread-multi
/usr/lib/perl5/5.8.0
/usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi
/usr/lib/perl5/site_perl/5.8.0
/usr/lib/perl5/site_perl
/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

.. and then a little further up, where you have your "locate" results;

Quote:
/home/.cpan/Bundle/DBI.pm
/usr/lib/perl5/site_perl/5.8.1/i686-linux/DBI.pm
/usr/lib/perl5/site_perl/5.8.1/i686-linux/Bundle/DBI.pm

Basically, if you make symlinks for DBI (or upgrade it to work on the other version of Perl), then it *should* work.

It could be deeper than that... but from a quick glance, thats what it looks like :)

Hope that helps.

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Can't locate DBI.pm in @INC In reply to
Thanks for the help Andy.
Yeah, the difference in perl was what I noticed. Your symlink advice seems like an easy enough solution -- I spent all nite trying to figure out how to get @INC changed -- but I'm not very confident with that sort of thing.

Which of those do you think would be least painful? Upgrading DBI or Making Sym Links?

If I were to make the sym links, what would they be?
/usr/lib/perl5/5.8.0 -----> /usr/lib/perl5/site_perl/5.8.1/i686-linux/Bundle/DBI.pm ?

Please advise if you can. If you would, please be specific. Angelic
I'm anxious to have this back up and running! I appreciate the help.

Will
Quote Reply
Re: [wwwill] Can't locate DBI.pm in @INC In reply to
Afraid I'm not sure which would be easier. If it were me, then I would just symlink them;

ln /old/path/ /new/path

(not sure if thats the correct invocation command).

Maybe someone with a little more experience in this matter could give a bit of advice :)

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Can't locate DBI.pm in @INC In reply to
I'm pretty sure the command is ln -s /old/path /new/path
should I link to /newperl/DBI.pm or to /newperl/BUNDLE/DBI.pm ?

how would you do it?
(I know I'm killin ya here, sorry -- just don't want to make a mistake).

What are your thoughts about this?: backup my DB, /admin/prefs/ , templates, DELETE my lsql 2.1.2 install completely, install 2.2.0? think I'll have better luck? A fresh install would probably find/use the 5.8.1 perl no?
Quote Reply
Re: [wwwill] Can't locate DBI.pm in @INC In reply to
Thinking about it, you may find it easier to just update the bundle.

Do it in SSH with;

perl -MCPAN 'install DBI'

Also, while you are there, it may be worth updating your wwwlib bundle (a default set of modules, which can be installed pretty easily in one go).

Afraid thats about as much help as I'm gonna be :(

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [wwwill] Can't locate DBI.pm in @INC In reply to
Hi,

You are using SpeedyCGI which was installed for perl5.8.0. You don't have DBI module installed in perl 5.8.1. What I'd suggest is do:

perl -v

Assuming that's perl 5.8.1, then do:

perl -MCPAN -e 'install CGI::SpeedyCGI'

which will install SpeedyCGI for perl5.8.1. Then when you use Speedy, it will be using perl5.8.1 which has the DBI module installed.

Cheers,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [Alex] Can't locate DBI.pm in @INC In reply to
thanks for the help Alex! (I opened a support ticket earlier referring to this thread to save typing it all over again and so you'd see what I'd tried so far).

I did what you suggested. transcript from ssh follows:
[root@srv root]# perl -v
This is perl, v5.8.1 built for i686-linux


[root@srv root]# perl -MCPAN -e 'install CGI::SpeedyCGI'
CPAN: Storable loaded ok
Going to read /root/.cpan/Metadata
Database was generated on Wed, 21 Jul 2004 11:18:34 GMT
CGI::SpeedyCGI is up to date.
[root@srv root]#

when I goto see what's happening in browser @ http://www.tripsmarter.com/...rectory/page.cgi?d=1 I get the same errors: (this link will be up so you can take a look)

A fatal error has occured:
Can't locate DBI.pm in @INC

System Information
======================================
Perl Version: 5.008
Links SQL Version: 2.1.2
Persistant Env: mod_perl (0) SpeedyCGI (1)
@INC =
../..
/home/fotu/public_html/cgi-bin/directory/admin
/usr/lib/perl5/5.8.0/i386-linux-thread-multi
/usr/lib/perl5/5.8.0
/usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi
/usr/lib/perl5/site_perl/5.8.0
/usr/lib/perl5/site_perl
/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

So it appears to my eyes that speedy is fine with perl 5.8.1, but lsql thinks to use 5.8.0?
Am I on the right track? What can I do to get this worked out?

thanks in advance,
Will

Last edited by:

wwwill: Jul 21, 2004, 11:36 AM
Quote Reply
Re: [wwwill] Can't locate DBI.pm in @INC In reply to
Hi,

What does perl -V say?

Cheers,

Alex
--
Gossamer Threads Inc.

Last edited by:

Alex: Jul 21, 2004, 11:39 AM
Quote Reply
Re: [Alex] Can't locate DBI.pm in @INC In reply to
Also, look at the top of your perl script, and check the path to speedy. Assuming it's #!/usr/bin/speedy, what does:

/usr/bin/speedy -- -v

print?

Cheers,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [Alex] Can't locate DBI.pm in @INC In reply to
Hi,
I had edited and added it to my post -- must've been too late for you to catch it. (I should've put it in the first time -- sorry bout that).

[root@srv root]# perl -v
This is perl, v5.8.1 built for i686-linux

looks like to me that DBI is w perl 5.8.1 and speedy is working with 5.8.1, but lsql install is using 5.8.0?

am I even close?
/clueless but trying

thanks,
Will
Quote Reply
Re: [wwwill] Can't locate DBI.pm in @INC In reply to
Sorry, I had edited it to. I meant perl -V (capital v).

Cheers,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [Alex] Can't locate DBI.pm in @INC In reply to
Ok here's one:
[root@srv root]# /usr/bin/speedy -- -v
SpeedyCGI speedy version 2.22 built for perl version 5.008_00 on i386-linux-thread-multi

here's another:
[root@srv root]# perl -V
Summary of my perl5 (revision 5.0 version 8 subversion 1) configuration:
Platform:
osname=linux, osvers=2.4.26, archname=i686-linux
uname='linux srv.tripsmarter.com 2.4.26 #1 smp wed apr 21 14:12:31 edt 2004 i686 i686 i386 gnulinux '
config_args='-ds -e -Dprefix=/usr'
hint=recommended, useposix=true, d_sigaction=define
usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef
useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
use64bitint=undef use64bitall=undef uselongdouble=undef
usemymalloc=n, bincompat5005=undef
Compiler:
cc='cc', ccflags ='-fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm',
optimize='-O3',
cppflags='-fno-strict-aliasing -I/usr/local/include -I/usr/include/gdbm'
ccversion='', gccversion='3.2.2 20030222 (Red Hat Linux 3.2.2-5)', gccosandvers=''
intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
alignbytes=4, prototype=define
Linker and Libraries:
ld='cc', ldflags =' -L/usr/local/lib'
libpth=/usr/local/lib /lib /usr/lib
libs=-lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lc
perllibs=-lnsl -ldl -lm -lcrypt -lutil -lc
libc=/lib/libc-2.3.2.so, so=so, useshrplib=false, libperl=libperl.a
gnulibc_version='2.3.2'
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic'
cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib'

Characteristics of this binary (from libperl):
Compile-time options: USE_LARGE_FILES
Built under linux
Compiled at Jul 6 2004 15:17:16
@INC:
/usr/lib/perl5/5.8.1/i686-linux
/usr/lib/perl5/5.8.1
/usr/lib/perl5/site_perl/5.8.1/i686-linux
/usr/lib/perl5/site_perl/5.8.1
/usr/lib/perl5/site_perl/5.8.0
/usr/lib/perl5/site_perl
.

what does all of this tell ya?

thanks,
Will
Quote Reply
Re: [wwwill] Can't locate DBI.pm in @INC In reply to
Ok, your speedy you are using is for perl 5.8. I'd mv it somewhere else and reinstall SpeedyCGI which should then link against perl 5.8.1.

Cheers,

Alex
--
Gossamer Threads Inc.

Last edited by:

Alex: Jul 21, 2004, 11:53 AM
Quote Reply
Re: [Alex] Can't locate DBI.pm in @INC In reply to
ok thanks! I'll try it, but if you don't mind:
1. move it somewhere else?
2. I installed speedy yesterday from rpm, won't it install to the same place as yesterday? any way for me to control that? suggestions?

thanks again,
Will
Quote Reply
Re: [wwwill] Can't locate DBI.pm in @INC In reply to
Hi,

It's probably best to just uninstall the speedy rpm, and then download speedy and install it manually (untar, perl Makefile.PL, make, make test, make install).

Cheers,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [Alex] Can't locate DBI.pm in @INC In reply to
CoolI uninstalled the rpm, and installed speedy manually, and all is well!
thanks for the help!!!

Will