CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: mod_perl:
Can't locate loadable object for module DBD::SQLite

 



ningji
User

Apr 17, 2015, 1:44 PM

Post #1 of 5 (87725 views)
Can't locate loadable object for module DBD::SQLite Can't Post

Hi everyone,

Not sure if i can explain this clearly.
We have an embedded ARM linux system using ubuntu fs. We can update the whole image (including our app, kernel, fs) to the SD card through 1 command (don't know the details for the command).

1. in the brand new working system, install sqlite support
apt-get install libdbi-perl
apt-get install libdbd-sqlite3-perl

my code runs fine with sqlite.

2. now run our image upgrade command.
my code failed to run

install_driver(SQLite) failed: Can't locate loadable object for module DBD::SQLite in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.14.2 /usr/local/share /perl/5.14.2 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.14 /usr/share/perl/ 5.14 /usr/local/lib/site_perl . /usr/share/perl5 /usr/share/perl5/CGI /usr/share /perl5 /usr/share/perl5/CGI /usr/share/perl5 /usr/lib/perl5 /usr/lib/perl5/DBI / usr/share/perl5/CGI /usr/share/perl5 /usr/share/perl5/CGI) at (eval 3) line 3
Compilation failed in require at (eval 3) line 3.
Perhaps a module that DBD::SQLite requires hasn't been fully installed
at something.pl line 71

3. install both modules again, said already installed

4. uninstall and reinstall again, now everything works
apt-get purge libdbd-sqlite3-perl
apt-get purge libdbi-perl

apt-get install libdbi-perl
apt-get install libdbd-sqlite3-perl


5. did compare @INC from step 2 and step 4, by running my perl code from wrong folder, it'll say cannot find abcde.pl from @INC.
But looks the same to me.

Any suggestions ?
Thanks !


Laurent_R
Veteran / Moderator

Apr 19, 2015, 11:21 PM

Post #2 of 5 (87497 views)
Re: [ningji] Can't locate loadable object for module DBD::SQLite [In reply to] Can't Post

I don't quite understand. If you run your program from a folder where it can't be found, you surely will get an error message. But why do you do that in the first place if you know it is not the right directory?


ningji
User

Apr 22, 2015, 7:36 AM

Post #3 of 5 (87094 views)
Re: [Laurent_R] Can't locate loadable object for module DBD::SQLite [In reply to] Can't Post

just get back, sorry for late reply.

i don't know how to check @INC in perl.
So if i run the code in the wrong folder, the error message will tell me the complete list of folders for @INC.

At first i thought the sqlite package folder was not in the @INC.
By comparing the working and non-working case, i don't see difference.


In Reply To
I don't quite understand. If you run your program from a folder where it can't be found, you surely will get an error message. But why do you do that in the first place if you know it is not the right directory?



Laurent_R
Veteran / Moderator

Apr 22, 2015, 8:46 AM

Post #4 of 5 (87071 views)
Re: [ningji] Can't locate loadable object for module DBD::SQLite [In reply to] Can't Post

Maybe you want to try this Perl one-liner:

Code
$perl -e 'print "$_\n" for @INC';


This is the list of directories that I get with this command:


Code
/opt/freeware/lib/perl5/5.10.1/ppc-aix-thread-multi 
/opt/freeware/lib/perl5/5.10.1
/opt/freeware/lib/perl5/site_perl/5.10.1/ppc-aix-thread-multi
/opt/freeware/lib/perl5/site_perl/5.10.1
.



ningji
User

Apr 23, 2015, 6:36 AM

Post #5 of 5 (86888 views)
Re: [Laurent_R] Can't locate loadable object for module DBD::SQLite [In reply to] Can't Post

Thanks Laurent, :)

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives