红联Linux门户
Linux帮助

XtraBackup备份出现"Can't locate Digest/MD5.pm in @INC"

发布时间:2017-03-27 09:51:59来源:cnblogs.com/kerrycode作者:潇湘隐者
在CentOS 7上安装了Xtrabackup 2.4.5(innobackupex version 2.4.5 Linux (x86_64) (revision id: e41c0be)),然后做备份时遇到下面错误信息“Can't locate Digest/MD5.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at - line 693”。具体错误提示信息如下:
 
170222 10:57:29 innobackupex: Starting the backup operation
IMPORTANT: Please check that the backup run completes successfully.
At the end of a successful backup run innobackupex
prints "completed OK!".
Can't locate Digest/MD5.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at - line 693.
BEGIN failed--compilation aborted at - line 693.
170222 10:57:29 Connecting to MySQL server host: 127.0.0.1, user: root, password: set, port: 3306, socket: (null)
Using server version 5.6.20-enterprise-commercial-advanced-log
/usr/bin/innobackupex version 2.4.5 based on MySQL server 5.7.13 Linux (x86_64) (revision id: e41c0be)
xtrabackup: uses posix_fadvise().
xtrabackup: cd to /var/lib/mysql/
xtrabackup: open files limit requested 0, set to 1024
xtrabackup: using the following InnoDB configuration:
xtrabackup:   innodb_data_home_dir = .
xtrabackup:   innodb_data_file_path = ibdata1:12M:autoextend
xtrabackup:   innodb_log_group_home_dir = ./
xtrabackup:   innodb_log_files_in_group = 2
xtrabackup:   innodb_log_file_size = 50331648
 
出现这个错误是因为安装Xtrabackup 2.4.5时,没有安装 perl-Digest-MD5组件。Percona官方文档里面介绍了使用yum、apt等安装方式,没有详细介绍使用rpm安装方式。这个文档里并没有要求安装组件perl-Digest-MD5。而我只安装了下面一些组件。
 
[root@DB-Server ~]# yum install cmake gcc gcc-c++ libaio libaio-devel automake autoconf bzr \
bison libtool ncurses5-devel
[root@DB-Server ~]# yum -y install perl perl-devel perl-Time-HiRes perl-DBD-MySQL
XtraBackup备份出现"Can't locate Digest/MD5.pm in @INC"
 
安装了perl-Digest-MD5后,问题即可解决。
[root@DB-Server ~]# yum -y install perl-Digest-MD5
 
本文永久更新地址:http://www.linuxdiyf.com/linux/29502.html