我想在我的本地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