Uggh... the dreaded DBD-mysql plugin problem. First, about my system:
Mac OS X 10.6.3
Architectures:
$ which perl
/opt/local/bin/perl
$ file /opt/local/bin/perl
/opt/local/bin/perl: Mach-O universal binary with 2 architectures /opt/local/bin/perl (for architec
+ture x86_64): Mach-O 64-bit executable x86_64 /opt/local/bin/perl (for architecture i386): Mach-O
+executable i386
$ which mysql
/usr/local/mysql/bin/mysql
$ file /usr/local/mysql/bin/mysql
/usr/local/mysql/bin/mysql: Mach-O executable i386
MySQL and PERL run just fine. DBI works just fine. Here is the output after running intro2.pl from DuBois "MySQL and Perl for the Web"
intro2.pl:
#! /usr/bin/perl
#intro2.pl - verify availability of CGI.pm and DBI modules
use CGI;
use DBI;
$cgi = new CGI; print "The CGI object was created successfully\n"; @driver_names = DBI->available_d
+rivers (); print "These DBI drivers are available: @driver_names\n"; exit (0);
After running the program:
$ ./intro2.pl The CGI object was created successfully These DBI drivers are available: DBM ExampleP
+ File Gofer Proxy SQLite Sponge
In the DBD::mysql dir:
DBD-mysql-4.014$ perl Makefile.pl --testuser='root' --testpassword='secret'
Finally, after running....
DBD-mysql-4.014$ make test
PERL_DL_NONLAZY=1 /opt/local/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', '
+blib/arch')" t/*.t t/00base....................ok 1/6 # Failed test 'use DBD::mysql;' # at t/00bas
+e.t line 21. # Tried to use 'DBD::mysql'. # Error: Can't load '/Users/james/Downloads/DBD-mysql-4.
+014/blib/arch/auto/DBD/mysql/mysql.bundle' for module DBD::mysql: dlopen(/Users/james/Downloads/DB
+D-mysql-4.014/blib/arch/auto/DBD/mysql/mysql.bundle, 2): Symbol not found: _is_prefix # Referenced
+ from: /Users/james/Downloads/DBD-mysql-4.014/blib/arch/auto/DBD/mysql/mysql.bundle # Expected in:
+ dynamic lookup # at (eval 5) line 2 # Compilation failed in require at (eval 5) line 2. # BEGIN f
+ailed--compilation aborted at (eval 5) line 2. t/00base....................NOK 2/6FAILED--Further
+testing stopped: Unable to load DBD::mysql make: *** [test_dynamic] Error 255
...I get the above output. I did try to make sure that mysql knew where to look for its libraries:
$ sudo ln -s /usr/local/mysql/lib /usr/local/mysql/lib/mysql
$ sudo ln -s /usr/local/mysql/include /usr/local/mysql/include/mysql
... not that I think that has ANYTHING to do with this fail.
I would appreciate any assistance and positive feedback... or even just a link where this specific issue is addressed. So far.. everything that I have read seems to be with respect to having MySQL compiled for x86_64 but this does not seem to be my issue. Regardless, my Perl is a universal library. I have had 0 problems installing other perl modules or using them. Thanks!
|