1. 程式人生 > >Can't locate Switch.pm in INC的解決

Can't locate Switch.pm in INC的解決

rhel7.4上對oracle 11.2.0.4打psu,直接就報這個錯誤:

[[email protected] grid]# /u01/app/grid/product/11.2.0/grid/OPatch/opatch auto /u01/setup/psu/26635745/ -ocmrf /u01/setup/psu/ocm.rsp

Can't locate Switch.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 /u01/app/grid/product/11.2.0/grid/OPatch/crs/auto_patch.pl line 2730.

BEGIN failed--compilation aborted at /u01/app/grid/product/11.2.0/grid/OPatch/crs/auto_patch.pl line 2730.

[[email protected] grid]#

這個是perl5.10以上版本的原因,如果是auto打psu,最簡單的辦法,就是把oracle的perl替換本身的perl,如下:

cp /u01/app/grid/product/11.2.0/grid/perl/lib/5.10.0/Switch.pm /usr/lib64/perl5/.

之後,再去安裝psu ,就沒有問題了.

[[email protected]

perl5]# /u01/app/grid/product/11.2.0/grid/perl/bin/perl /u01/app/grid/product/11.2.0/grid/OPatch/opatch auto /u01/setup/psu/26635745/ -ocmrf /u01/setup/psu/ocm.rsp

Executing /u01/app/grid/product/11.2.0/grid/perl/bin/perl /u01/app/grid/product/11.2.0/grid/OPatch/crs/patch11203.pl -patchdir /u01/setup/psu -patchn 26635745 -ocmrf /u01/setup/psu/ocm.rsp -paramfile /u01/app/grid/product/11.2.0/grid/crs/install/crsconfig_params

This is the main log file: /u01/app/grid/product/11.2.0/grid/cfgtoollogs/opatchauto2017-12-25_21-20-02.log

This file will show your detected configuration and all the steps that opatchauto attempted to do on your system:

/u01/app/grid/product/11.2.0/grid/cfgtoollogs/opatchauto2017-12-25_21-20-02.report.log

2017-12-25 21:20:02: Starting Clusterware Patch Setup

Using configuration parameter file: /u01/app/grid/product/11.2.0/grid/crs/install/crsconfig_params

Stopping CRS...

Stopped CRS successfully

patch /u01/setup/psu/26635745/26392168 apply successful for home /u01/app/grid/product/11.2.0/grid

patch /u01/setup/psu/26635745/26609929 apply successful for home /u01/app/grid/product/11.2.0/grid

patch /u01/setup/psu/26635745/22502505 apply successful for home /u01/app/grid/product/11.2.0/grid

Starting CRS...

Installing Trace File Analyzer

CRS-4123: Oracle High Availability Services has been started.

opatch auto succeeded.

[[email protected] perl5]#