简体   繁体   English

在Windows XP上安装Perl Strawberry,MySQL和DBD :: mysql的顺序步骤

[英]Sequenced steps to install 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. 我正在寻找一个很好的指南,在Windows XP上安装Perl Strawberry,MySQL和DBD :: mysql的顺序和详细步骤。

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 我想在这里实现的主要目标是能够使用DBD :: mysql通过Perl Strawberry创建数据库并对它们执行常规操作

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 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) 我自己(在另一台计算机上)得到的最远的是安装Perl Strawberry并正常工作,安装MySQL,并尝试使用cpan DBD::mysql安装模块(因为无法找到而失败) MySQL - 我也尝试过--with-mysql=C:\\path\\to\\mysql它建议的--with-mysql=C:\\path\\to\\mysql选项,但这对我不起作用)

I wanted to install bugzilla on my local windows 7 machine and had a similar issue with mysql. 我想在我的本地Windows 7机器上安装bugzilla,并且与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. 虽然草莓perl的自动更新机制工作得很好并安装了所有缺失的软件包,但似乎某个草莓perl版本(我使用的是5.16.1.1),mysql驱动程序有问题。

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/ ): 但是所需的文件就在那里,所以经过网上的大量搜索后,我在一篇文章的评论部分找到了一个解决方案( 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 . AFAIK,草莓的最新版本捆绑了DBD::mysql

In addition, Strawberry Perl provides ppm to install precompiled binary packages. 此外,Strawberry Perl提供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. 还有DWIM Perl ,其中包含许多流行的附加模块,如Moose,Dancer,Perl Critic,Perl Tidy,甚至是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. 似乎使用这些安装之一是最简单的方法 - 因为您仍然可以获得工作cpan的好处,并自己为您的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. 上次我使用activestate的perl + cpan我记得在通过cpan安装一些模块后,一堆东西停止工作,所以我放弃了它。 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. 通过ppm安装所有软件包,或使用他们糟糕的ppm GUI管理器,并没有与我很好地融合,因为无论我在哪个系统,我本能地使用cpanm并且希望我的所有模块都以Perl方式编译/安装。

如果您正在寻找“正常工作”的解决方案,您可以尝试使用ActivePerl,在这里您可以通过ppm安装DBD :: mysql作为预编译二进制文件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM