ITPub博客

首页 > 数据库 > MySQL > innobackupex Can't locate Time/HiRes.pm

innobackupex Can't locate Time/HiRes.pm

原创 MySQL 作者:chales675 时间:2015-05-10 16:05:25 0 删除 编辑
今天使用 innobackupex备份初始化环境时报错如下:
-bash-4.1$ innobackupex -help
Can't locate Time/HiRes.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 /data/mysql/tool/percona-xtrabackup-2.2.10-Linux-x86_64/bin/innobackupex line 24.
BEGIN failed--compilation aborted at /data/mysql/tool/percona-xtrabackup-2.2.10-Linux-x86_64/bin/innobackupex line 24.

解决方法:
1.挂载光驱,
2.配置yum源为本地
[root@centos1 yum.repos.d]# pwd
/etc/yum.repos.d
[root@centos1 yum.repos.d]# more CentOS-Media.repo
# CentOS-Media.repo
#
#  This repo can be used with mounted DVD media, verify the mount point for
#  CentOS-6.  You can use this repo and yum to install items directly off the
#  DVD ISO that we release.
#
# To use this repo, put in your DVD and use it with the other repos too:
#  yum --enablerepo=c6-media [command]
# 
# or for ONLY the media repo, do this:
#
#  yum --disablerepo=\* --enablerepo=c6-media [command]
 
[c6-media]
name=CentOS-$releasever - Media
baseurl=file:///mnt/cdrom/
gpgcheck=0
enabled=1
#gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
[root@centos1 yum.repos.d]#

3.安装 perl-Time-HiRes

[root@centos1 Packages]# yum install perl-Time-HiRes
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package perl-Time-HiRes.x86_64 4:1.9721-136.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

====================================================================================================================================
 Package                            Arch                      Version                             Repository                   Size
====================================================================================================================================
Installing:
 perl-Time-HiRes                    x86_64                    4:1.9721-136.el6                    c6-media                     48 k

Transaction Summary
====================================================================================================================================
Install       1 Package(s)

Total download size: 48 k
Installed size: 56 k
Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : 4:perl-Time-HiRes-1.9721-136.el6.x86_64                                                                          1/1
  Verifying  : 4:perl-Time-HiRes-1.9721-136.el6.x86_64                                                                          1/1

Installed:
  perl-Time-HiRes.x86_64 4:1.9721-136.el6                                                                                          

Complete!
[root@centos1 Packages]#

5.查看是否正常:

-bash-4.1$ ./innobackupex -help
Options:
    --apply-log
        Prepare a backup in BACKUP-DIR by applying the transaction log file
        named "xtrabackup_logfile" located in the same directory. Also,
        create new transaction logs. The InnoDB configuration is read from
        the file "backup-my.cnf".

    --backup-locks
        This option controls if backup locks should be used instead of FLUSH
        TABLES WITH READ LOCK on the backup stage. The option has no effect
        when backup locks are not supported by the server. This option is

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/13488447/viewspace-1633392/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2011-03-05

  • 博文量
    4
  • 访问量
    40543