在rhel7的11.2.0.4 的GI上rootcrs.pl -unlock失败
[root@rac1 ~]# /u01/app/11.2.0/grid/crs/install/rootcrs.pl -unlock
Can't locate Env.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 . /u01/app/11.2.0/grid/crs/install) at /u01/app/11.2.0/grid/crs/install/crsconfig_lib.pm line 703.
BEGIN failed--compilation aborted at /u01/app/11.2.0/grid/crs/install/crsconfig_lib.pm line 703.
Compilation failed in require at /u01/app/11.2.0/grid/crs/install/rootcrs.pl line 305.
BEGIN failed--compilation aborted at /u01/app/11.2.0/grid/crs/install/rootcrs.pl line 305.
[root@rac1 ~]#
解决方法:
参考:rootcrs.pl/roothas.pl Fails With Can't locate Env.pm (Doc ID 2019784.1)
SYMPTOMS
While performing deconfig of GI could fail as below due to the issue with perl
[root@RAC01 grid]# /u01/app/oracle/product/11.2.0.4/grid/crs/install/roothas.pl -deconfig -force
Can't locate Env.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 . /u01/app/oracle/product/11.2.0.4/grid/crs/install) at /u01/app/oracle/product/11.2.0.4/grid/crs/install/crsconfig_lib.pm line 703.
BEGIN failed--compilation aborted at /u01/app/oracle/product/11.2.0.4/grid/crs/install/crsconfig_lib.pm line 703.
Compilation failed in require at /u01/app/oracle/product/11.2.0.4/grid/crs/install/roothas.pl line 166.
BEGIN failed--compilation aborted at /u01/app/oracle/product/11.2.0.4/grid/crs/install/roothas.pl line 166.
Can't locate Env.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 . /u01/app/oracle/product/11.2.0.4/grid/crs/install) at /u01/app/oracle/product/11.2.0.4/grid/crs/install/crsconfig_lib.pm line 703.
BEGIN failed--compilation aborted at /u01/app/oracle/product/11.2.0.4/grid/crs/install/crsconfig_lib.pm line 703.
Compilation failed in require at /u01/app/oracle/product/11.2.0.4/grid/crs/install/roothas.pl line 166.
BEGIN failed--compilation aborted at /u01/app/oracle/product/11.2.0.4/grid/crs/install/roothas.pl line 166.
CAUSE
Issue with the OS default perl, also fixed in the following:
BUG 18650453 - OL7: CLUSTERWARE ROOT SCRIPTS FAIL DUE TO: CAN'T LOCATE ENV.PM IN @INC
SOLUTION
The fix is included in 12.1.0.2, the workaround is to use the perl in GI home.
Example :
/u01/app/oracle/product/11.2.0.4/grid/perl/bin/perl /u01/app/oracle/product/11.2.0.4/grid/crs/install/roothas.pl -deconfig -force
虽然mos文档中是roothas.pl,但是我遇到的问题是rootcrs.pl -unlock时,于是改为如下命令即可:
/u01/app/11.2.0/grid/perl/bin/perl /u01/app/11.2.0/grid/crs/install/rootcrs.pl -unlock