
bmanco
Novice
Aug 26, 2010, 3:39 PM
Post #1 of 1
(2201 views)
|
|
Error Running DBI Script: /usr/bin/perl: symbol lookup error
|
Can't Post
|
|
Hi all. I've only been programming Perl for a few weeks, so it goes without saying that I'm a total newbie, but I've found myself thrust into a project where I have to access a sqlite3 database using DBI. This database is located on a machine where my access is pretty limited, and I found out that it doesn't have DBD::SQLite installed. Of course, I don't have write permission in any of the directories where Perl modules are installed. So I installed DBI and DBD::SQLite in my home directory, and pointed to it in my code, the beginning of which is as follows:
#!/usr/bin/perl -I/home/nbj/perlmodules/lib use DBI; use strict; my $dbh = DBI->connect("dbi:SQLite:dbname=/data/general/telemetry_orbit_attitude.db") or die "Couldn't connect to database: " . DBI->errstr; my $sth = $dbh->prepare('SELECT * FROM files') or die "Couldn't prepare statement: " . $dbh->errstr; my @telemetry_data; $sth->execute(); But when I run it, I get the following error: /usr/bin/perl: symbol lookup error: /home/nbj/perlmodules/lib/auto/DBI/DBI.so: undefined symbol: Perl_Istack_sp_ptr I'm not sure what this is, and google hasn't been all that helpful. Any help would be greatly appreciated. EDIT: So I have resolved this problem by installing the latest version of Perl in my home directory and using that instead of the Perl installed on the other machine. However, I would still be interested to know why this error occured. Seems like some sort of weird compatibility issue.
(This post was edited by bmanco on Aug 27, 2010, 4:42 PM)
|