我想在我的本地Windows 7机器上安装bugzilla,并有类似的问题与MySQL。
尽管草莓perl的自动更新机制工作得很好,并安装了所有缺少的软件包,但似乎像某个草莓perl版本(我使用5.16.1.1),mysql驱动程序有问题。
我会得到一个错误说:
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.
但所需的文件在那里,所以很多在网络上搜索后,我发现在文章的评论部分的解决方案(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!"
它的工作原理!
我希望这可以帮助其他人有同样的问题。
我结束了使用'DBI'而不是 – CheeseConQueso 2010-11-24 23:57:11
你说*“我结束了使用DBI”*。这是一种奇怪的说法,因为DBI使用适当的DBD模块与数据库进行通信。所以,'DBI'需要'DBD :: mysql'才能够与MySQL数据库连接。 – 2010-12-06 19:18:02
@Sinan - 这是我缺乏的关键信息。我有'使用DBI;'和'DBI-> connect('DBI:mysql:db','','',\%dbattr)''所以我认为dbd完全是一个不同的模块。感谢您清除 – CheeseConQueso 2010-12-07 03:01:30