【发布时间】:2011-02-23 16:56:18
【问题描述】:
尝试在 Windows 7 上安装 Perl 模块 DBD::mysql
从我执行的 Windows 命令行
perl -MCPAN -e 'install DBD::mysql'
下载并解压文件——然后给了我这个错误:
CPAN.pm: Going to build C/CA/CAPTTOFU/DBD-mysql-4.018.tar.gz
Set up gcc environment - 3.4.5 (mingw-vista special r3)
C:\PROGRA~1\MySQL\MYSQLS~1.1\bin\MYSQLA~1.EXE: connect to server at 'localhost'
failed
error: 'Access denied for user 'ODBC'@'localhost' (using password: NO)'
Problem running C:\PROGRA~1\MySQL\MYSQLS~1.1\bin\MYSQLA~1.EXE - aborting ...
Warning: No success on command[C:\Perl\bin\perl.exe Makefile.PL INSTALLDIRS=site
]
猜测问题是 MySQL 的 root 用户有密码,但不清楚我是如何解决这个问题的。
问题、反馈、请求——只需发表评论,谢谢!!
---------- 更新 (1): RE: 强制安装 DBD::mysql
cpan> force install DBD::mysql
Running install for module 'DBD::mysql'
Running make for C/CA/CAPTTOFU/DBD-mysql-4.018.tar.gz
Has already been unwrapped into directory C:\Perl\cpan\build\DBD-mysql-4.018-A
1T8Uh
'C:\Perl\bin\perl.exe Makefile.PL INSTALLDIRS=site' returned status 256, won't
make
Running make test
Make had some problems, won't test
Running make install
Make had some problems, won't install
【问题讨论】:
-
您在 Windows 上为 Perl 使用哪个供应商?您在文档的安装部分 (search.cpan.org/~capttofu/DBD-mysql-4.018/lib/DBD/…) 中尝试过哪些无效的操作?
-
@Robert P:谢谢,这行得通——把它作为答案发布,请随时重新发布我的笔记作为你的答案,我会删除我的,并选择你作为答案。再次,谢谢!!
标签: perl installation perl-module