Can't locate DBI.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.10.1
/usr/local/share/perl/5.10.1 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10
/usr/local/lib/site_perl .) at /usr/local/webserver/mysql/bin/mysqlhotcopy line 8.
BEGIN failed--compilation aborted at /usr/local/mysql/bin/mysqlhotcopy line 8.
错误原因:系统没有按安装DBI组件.
DBI(Database Interface)是perl连接数据库的接口,其是perl连接数据库的最优秀方法,他支持包括 Orcal,Sybase,mysql,db2等绝大多数的数据库
解决办法:apt-get install libclass-dbi-mysql-perl
此方法适用于debian,ubuntu,centos可以改用yum试试,如果是Redhat/CentOS,执行命令,代码如下:
01.yum install perl-DBI perl-DBD-MySQL -y
如果是大便、Ubuntu,执行命令
01.apt-get perl-DBI perl-DBD-MySQL
解决方法二
安装 dbi,检查dbi,Sql代码如下:
1.rpm -qa |grep perl-DBD | grep MySQL rpm -qa |grep perl-DBD | grep MySQL
安装,Sql代码如下:
yum -y install perl-DBD-MySQL
yum -y install perl-DBD-MySQL
或者单独装DBI、Data-ShowTable、DBD-mysql 三个组件.
使用mysqlhotcopy,Sql代码如下:
/usr/local/webserver/mysql5.1.57/bin/mysqlhotcopy tongchao /data1/backup/tongchao
新闻热点
疑难解答