Mysql.pm not in @INC

Problems with the Linux version of XAMPP, questions, comments, and anything related.

Mysql.pm not in @INC

Postby xpucmoc » 26. October 2009 15:49

Hello,
I'm running Debian Linux and have xampp installed.
I wrote a little perl script, that uses Mysql library to connect to the xampp mysql server(localhost). It gets an error:
Can't locate Mysql.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.10.0 /usr/local/share/perl/5.10.0 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl .) at aop3.pl line 3.
BEGIN failed--compilation aborted at aop3.pl line 3.

It is obvious that it searches in the wrong directories, but how can I make it see the proper ones?
I tried some workarounds like:
use lib '/opt/lampp/lib/perl5/site_perl/5.10.0/i686-linux';
use DBD::mysql;

But it only gets another error:
Can't load '/opt/lampp/lib/perl5/site_perl/5.10.0/i686-linux/auto/DBI/DBI.so' for module DBI: /opt/lampp/lib/perl5/site_perl/5.10.0/i686-linux/auto/DBI/DBI.so: undefined symbol: PL_dowarn at /usr/lib/perl/5.10/DynaLoader.pm line 196.
at /opt/lampp/lib/perl5/site_perl/5.10.0/i686-linux/DBI.pm line 263
BEGIN failed--compilation aborted at /opt/lampp/lib/perl5/site_perl/5.10.0/i686-linux/DBI.pm line 263.
Compilation failed in require at /opt/lampp/lib/perl5/site_perl/5.10.0/i686-linux/DBD/mysql.pm line 7.
BEGIN failed--compilation aborted at /opt/lampp/lib/perl5/site_perl/5.10.0/i686-linux/DBD/mysql.pm line 7.
Compilation failed in require at aop3.pl line 4.
BEGIN failed--compilation aborted at aop3.pl line 4.

I can provide the whole perl script, but it is pretty simple - it just tries to connect to localhost mysql server and execute a query.
xpucmoc
 
Posts: 1
Joined: 26. October 2009 15:34

Re: Mysql.pm not in @INC

Postby Wiedmann » 26. October 2009 15:55

It is obvious that it searches in the wrong directories,

Because you are using the wrong perl.
Wiedmann
AF Moderator
 
Posts: 17106
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany


Return to XAMPP for Linux

Who is online

Users browsing this forum: No registered users and 6 guests