作者holishing ( )
看板FreeBSD
标题Re: [问题] Can't locate Msql.pm in @INC ......
时间Thu May 17 09:39:38 2018
※ 引述《TPPCMAN ()》之铭言:
: 要判定 在9.3上面有安装成功 则是在 sh 跑完後
: 执行 perl test.pl 档
: 执行的结果会在文字模式 列出一个小表格
: 11.1 执行 perl test.pl 则是 出现如下错误
: Can't locate Mysql.pm in @INC (you may need to install the Mysql module) (@INC contains: /usr/local/lib/perl5/site_perl/mach/5.24 /usr/local/lib/perl5/site_perl /usr/local/lib/perl5/5.24/mach /usr/local/lib/perl5/5.24 .) at test.pl line 2.
: BEGIN failed--compilation aborted at test.pl line 2.
照 log 猜...不知道是不是 p5-DBD-mysql 之类没安装?
https://www.freshports.org/databases/p5-DBD-mysql/
又或是大小写? ( mysql.pm v.s. Mysql.pm )
或是要再跟前面的人确认他当时用的版本是不是也另外打包自己才有的东西?
: 一开始 我猜想 或许是 作业系统太旧 而 pkg 太旧
: 也下载了 或是 ports装 比较适於11.1的pkg
: 但错误依旧
: 还蛮伤脑筋的
: --------------附上 test.pl 内容---------------
: #!/usr/bin/perl
: use Mysql;
: $dbh=Mysql->connect("localhost","mysql","root","XXXX");
: $q_str="show databases";
: $row=$dbh->query($q_str);
: while(($db)=$row->fetchrow) {
: $q_str = "show tables from $db";
: $row1=$dbh->query($q_str);
: while(($tbl)=$row1->fetchrow) {
: $q_str="alter table $db.$tbl type=MyISAM;";
: print "$q_str\n";
: }
: }
--
Param
ore - Franklin
And when we get home, I know we won't be home at all
This place we live, it is not where we belong
And I miss who we were in the town that we could call our own
Going back to get away after everything has changed
--
※ 发信站: 批踢踢实业坊(ptt.cc), 来自: 140.116.101.37
※ 文章网址: https://webptt.com/cn.aspx?n=bbs/FreeBSD/M.1526521182.A.551.html