Can't locate Time/HiRes.pm in @INC

本文介绍了在安装Percona XtraBackup 2.2.5版本于Oracle Linux Server 6.3时,遇到无法找到Time/HiRes模块导致的错误。通过安装perl-Time-HiRes包成功解决了该问题,并提供了InnoDB Backup Utility的版本信息。

Oracle Linux Server release 6.3 安装percona-xtrabackup-2.2.5-5027-Linux-x86_64,遇到如下错误:

percona-xtrabackup:#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 /usr/bin/innobackupex line 24.
BEGIN failed--compilation aborted at /usr/bin/innobackupex line 24.

 

Google后,安装perl-Time-HiRes后解决。


#rpm -ivh perl-Time-HiRes-1.9721-127.el6.x86_64.rpm

 

innobackupex --version
InnoDB Backup Utility v1.5.1-xtrabackup; Copyright 2003, 2009 Innobase Oy
and Percona LLC and/or its affiliates 2009-2013.  All Rights Reserved.

This software is published under
the GNU GENERAL PUBLIC LICENSE Version 2, June 1991.

Get the latest version of Percona XtraBackup, documentation, and help resources:
http://www.percona.com/xb/p

 

The error 'Can't locate Time/Piece.pm in @INC' typically indicates that the Perl interpreter is unable to find the `Time::Piece` module in its library search path (`@INC`). Here are several possible solutions: ### Install the Module If the `Time::Piece` module is not installed on the system, it can be installed using the system's package manager. For example, on Debian or Ubuntu systems, the following command can be used: ```bash sudo apt-get install libtime-piece-perl ``` On Red Hat or CentOS systems, the command is: ```bash sudo yum install perl-Time-Piece ``` ### Use CPAN The Comprehensive Perl Archive Network (CPAN) is a repository of Perl modules. The `cpan` command-line tool can be used to install the module. First, start the CPAN shell: ```bash perl -MCPAN -e shell ``` Then, at the CPAN prompt, enter the following command to install `Time::Piece`: ```plaintext install Time::Piece ``` ### Check the Library Path If the module is installed but the Perl interpreter cannot find it, it may be necessary to check and modify the library search path. The `@INC` array can be modified in a Perl script using the `use lib` statement. For example: ```perl use lib '/path/to/module'; use Time::Piece; ``` Replace `/path/to/module` with the actual directory where the `Time::Piece` module is located. ### Environment Variables The `PERL5LIB` environment variable can be used to add directories to the Perl library search path. For example, to add a directory to the search path for the current shell session: ```bash export PERL5LIB=/path/to/module:$PERL5LIB ``` To make the change permanent, add the above line to the shell profile file (e.g., `~/.bashrc` or `~/.bash_profile`).
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值