执行perl xttdriver.pl报错Can't locate GetoptLong.pm in @INC

执行perl xttdriver.pl报错Can't locate GetoptLong.pm in @INC,第1张

概述环境:AIX 6.1 + Oracle 10.2.0.4 现象:在做xtts测试时,源环境使用Oracle自带的perl执行xttdriver.pl报错如下: $ $ORACLE_HOME/perl/bin/perl xttdriver.plCan‘t locate Getopt/Long.pm in @INC (@INC contains: /project/aix5l64/main/APAC

环境:AIX 6.1 + Oracle 10.2.0.4
现象:在做xtts测试时,源环境使用Oracle自带的perl执行xttdriver.pl报错如下:

$ $ORACLE_HOME/perl/bin/perl xttdriver.plCan‘t locate Getopt/Long.pm in @INC (@INC contains: /project/aix5l64/main/APACHE/perl/bin/AIX/Opt/lib/5.8.3/aix-thread-multi /project/aix5l64/main/APACHE/perl/bin/AIX/Opt/lib/5.8.3 /project/aix5l64/main/APACHE/perl/bin/AIX/Opt/lib/site_perl/5.8.3/aix-thread-multi /project/aix5l64/main/APACHE/perl/bin/AIX/Opt/lib/site_perl/5.8.3 /project/aix5l64/main/APACHE/perl/bin/AIX/Opt/lib/site_perl .) at xttdriver.pl line 126.BEGIN Failed--compilation aborted at xttdriver.pl line 126.

而在目标环境linux6.8 + Oracle 11.2.0.4 就正常,起初我没多想这个问题,以为是10g的自带perl版本过低不支持,第一轮测试使用了系统自带perl可执行。
但在后续测试中发现系统自带的perl在执行过程中也是有很多类似错误,虽然最终完成,但担心有其他隐患,和有经验的同事进一步沟通,得知之前成功的xtts项目都是采用oracle自带的perl,某些版本报这个错误是需要额外设置环境变量。

具体依据下面的MOS文档,需要设置PER5liB环境变量:

perl xttdriver.pl fails: Can‘t locate Getopt/Long.pm in @INC (文档 ID 1912400.1)

临时设置PERL5liB环境变量:

$ export PERL5liB=$ORACLE_HOME/perl/lib

再次使用Oracle自带的perl执行xttdriver.pl不再报之前的错误,这里测试没加参数,就正常列出了xttdriver.pl的使用方法:

$ $ORACLE_HOME/perl/bin/perl xttdriver.pl============================================================trace file is /tmp/Nov15_Thu_16_29_45_413//Nov15_Thu_16_29_45_413_.log=============================================================--------------------------------------------------------------------Parsing propertIEs----------------------------------------------------------------------------------------------------------------------------------------Done parsing propertIEs----------------------------------------------------------------------------------------------------------------------------------------Checking propertIEs----------------------------------------------------------------------------------------------------------------------------------------Done checking propertIEs--------------------------------------------------------------------   This program prepares,backsup and rollsforward tablespaces   for cross-platform transportable tablespaces.    usage: xttdriver.pl                  {[--backup|-b] || [--bkpincr|-B] || [--bkpexport/E]                   [--resincrdmp|M]                   [--fixnewdf|W]                   [--convert/-c] || [--generate|-e] || [--incremental|-i] ||                   [[--prepare|-p] || [--getfile|-G]] ||                   [--restore|R] || [--recover|X]                   [--rollforward|-r [--rolltbs|-T <TBS1[,TBS2]>] ||                   [--determinescn|-s] ||                   [--orasID/O] || [--orahome|-o]]                   [--help|-h]}       Additional options       ------------------               [--deBUG|d] [--clearerrorfile|-C] [--xttdir|Dir <tmpdir>]               [-F/--propfile] [-I/--propdir]     -b  : For 12c and above,generate transportable backups     -B  : For 12c and above,generate level 1 transportable backups     -c  : conversion of datafiles     -M  : create the dump file from the generated backup     -e  : generate impdp script: export over new link     -i  : incremental backup     -p  : prepare     -G  : get datafiles from source database using get_file,should not           be used together with -p     -r  : roll forward datafiles     -s  : new from_scn values into xttplan.txt     -R  : For 12c restore the datafiles from the backups     -X  : For 12c recover the datafiles from the backups     -T  : roll forward specific tablespace(s)     -h  : this (help) message (Default)     -d  : provIDes more deBUG information,also rman is called with deBUG           option so that tracing is better.     -L  : delete the ERROR file and proceed with the execution     -D  : Instead of defining environement variable,user can pass tmpdir           through xttdir     -O  : Use this option to pass ORACLE_SID to overrIDe the environment           variable     -o  : Use this option to pass ORACLE_HOME to overrIDe the environment           variable     -I  : Use this option to mention the location from where the script           will pick the propertIEs file etc     -F  : Use this option to mention the location from where the script           will pick the propertIEs file.     -W  : Will try to reconstruct files on the destination after new            datafiles have been added    example: xttdriver.pl -p             xttdriver.pl -i             xttdriver.pl -r             xttdriver.pl -s$

既然如此,后续还是建议使用oracle自带的perl进行测试。

总结

以上是内存溢出为你收集整理的执行perl xttdriver.pl报错Can't locate Getopt/Long.pm in @INC全部内容,希望文章能够帮你解决执行perl xttdriver.pl报错Can't locate Getopt/Long.pm in @INC所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/langs/1271854.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-06-08
下一篇 2022-06-08

发表评论

登录后才能评论

评论列表(0条)

保存