Posted on 2008-07-06 04:42:27-07 by inthefog
Can't locate loadable object error - can't use Perl to connect to MySQL
When I try to run a .pl script to select from a mysql database, it fails on line 3 - use DBI; with the message install_drive<mysql> failed: Can't locate loadable object for dbd::mysql in @inc <@inc contains C:/perl/site/lib C:/perl/lib .> at <eval 4> line 3 Compilation failed in require at <eval 4> line 3. Perhaps a module that DBD::mysql requires hasn't been fully installed. I got from Perl from Activestate but it did not come with DBD::mysql. I downloaded DBD-mysql-4.007 to C:/Users/OEM/Documents/DBDMySQL/DBD-mysql-4.007 and read file:///C:/Users/OEM/Documents/DBDMySQL/DBD-mysql-4.007/INSTALL.html I tried >ppm install DBD-mysql as per the above INSTALL instruction but got error "can't find any package that provides dbd-mysql" I tried >ppm install DBD::mysql but that just got me a package called informationschema I tried cpan> install DBD::mysql but that did not seem to complete. I then copied mysql.pm from the DBD-mysql-4.007 download to the C:\perl\lib\dbd directory which gave me some progress as the error I was getting before I did this was........ install_drive<mysql> failed: Can't locate DBD::mysql in @inc I guess there are other components I need in the perl path. I tried to find out how to adjust @inc but failed. Hopefully someone can help me???? Thank you
Direct Responses: 9625 | Write a response
Posted on 2008-12-31 13:22:37-08 by ronap in response to 8233
Re: Can't locate loadable object error - can't use Perl to connect to MySQL
Hi, have you solved "can't find any package that provides dbd-mysql"? or, have you obtained a complete DBD::mysql installation using cpan? I have encountered similar problems, as you can read in my "any DBD package+uninitialized value" message posted to DBD CPAN Forum. Can you help me, please? Many thanks in advance. Best Regards Roberto
Direct Responses: Write a response
Perl Weekly newsletter
A free weekly newsletter for people who are busy to read all the blogs. click here to check it out.