开发者

Sequenced steps to install Perl Strawberry, MySQL, and DBD::mysql on Windows XP

开发者 https://www.devze.com 2023-01-26 02:23 出处:网络
I\'m looking for a good guide with sequenced and detailed steps for installing Perl Strawberry, MySQL, and DBD::mysql on Windows XP.

I'm looking for a good guide with sequenced and detailed steps for installing Perl Strawberry, MySQL, and DBD::mysql on Windows XP.

The main goal I want to accomplish here is to have the ability to create databases and perform regular actions against them via Perl Strawberry using DBD::mysql

I've found this so far, but it's a little out-dated and I don't want to go through all that just to find out that it doesn't work.

The furthest I've gotten on my own (on another computer) is getting Perl Strawberry installed and to work properly, getting MySQL开发者_StackOverflow中文版 installed, and ATTEMPT to use cpan DBD::mysql to install the module (which failed because it couldn't find MySQL - I also tried the --with-mysql=C:\path\to\mysql option it suggests, but that does't work for me)


I wanted to install bugzilla on my local windows 7 machine and had a similar issue with mysql.

Although the automatic update mechanism of strawberry perl worked great and installed all missing packages, it seems that, as of a certain strawberry perl version (I used 5.16.1.1), the mysql driver has a problem.

I would get an error saying:

install_driver(mysql) failed: Can't load 'C:/Perl/site/lib/auto/DBD/mysql/mysql.dll' for module DBD::mysql: load_file:The specified module could not be found at C:/Perl/lib/DynaLoader.pm line 230. at (eval 34) line 3 Compilation failed in require at (eval 34) line 3.

But the required file was there, so after a lot of searching on the web, I found a solution in the comments section of an article (http://lpsolit.wordpress.com/2010/05/15/installing-dbdmysql-what-a-pain/):

"For the record, and thanks to glob, the way to fix the problem with Strawberry Perl is to copy C:\strawberry\c\bin\libmysql_.dll to C:\strawberry\perl\vendor\lib\auto\DBD\mysql\libmysql_.dll. Yay!"

It works !

I hope this helps other people who have the same issue.


AFAIK, recent versions of Strawberry come bundled with DBD::mysql.

In addition, Strawberry Perl provides ppm to install precompiled binary packages.


If you're looking for a "just works" solution you could try ActivePerl, where you can install DBD::mysql as a precompiled binary via ppm.


There's also DWIM Perl which contains many popular additional modules such as Moose, Dancer, Perl Critic, Perl Tidy, and even the Perl IDE - Padre.

It seems that using one of these installations is the easiest method - as you still get the benefits of having a working cpan and compiling most of your modules yourself for your perl. Last time I used activestate's perl + cpan I remember after installing some modules via cpan a bunch of stuff stopped working so I gave up on it. Installing all packages via ppm, or using their terrible ppm GUI manager, did not mesh well with me as regardless of the system I'm on I instinctively use cpanm and would like to have all my modules compiled/installed the Perl way.

0

精彩评论

暂无评论...
验证码 换一张
取 消