重庆思庄Oracle、Redhat认证学习论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 5349|回复: 3
打印 上一主题 下一主题

在 oel7.0上面安装psu11.2.0.4.7遇到Can't locate Switch.pm

[复制链接]
跳转到指定楼层
楼主
发表于 2015-8-27 15:54:57 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

如题:

 

环境:

os:oel 7.0

db:oracle 11.2.0.4 +rac

 

在 oel 7.0上面安装 oracle psu 11.2.0.4.7,执行自动打补丁,就报错:

 

[root@rac1 ~]# export PATH=/u01/app/grid/product/11.2.0/grid/OPatch:$PATH
[root@rac1 ~]#
[root@rac1 ~]# cat /etc/*release*
Oracle Linux Server release 7.0
NAME="Oracle Linux Server"
VERSION="7.0"
ID="ol"
VERSI
PRETTY_NAME="Oracle Linux Server 7.0"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:oracle:oracle_linux:7.0:GA:server"
HOME_URL="https://linux.oracle.com/"
BUG_REPORT_URL="https://bugzilla.oracle.com/"

ORACLE_BUGZILLA_PRODUCT="Oracle Linux 7"
ORACLE_BUGZILLA_PRODUCT_VERSION=7.0
ORACLE_SUPPORT_PRODUCT="Oracle Linux"
REDHAT_SUPPORT_PRODUCT_VERSION=7.0
Red Hat Enterprise Linux Server release 7.0 (Maipo)
Oracle Linux Server release 7.0
cpe:/o:oracle:oracle_linux:7.0:ga:server
[root@rac1 ~]#
[root@rac1 ~]# opatch auto /u01/psu/20996923 /u01/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 2734.
BEGIN failed--compilation aborted at /u01/app/grid/product/11.2.0/grid/OPatch/crs/auto_patch.pl line 2734.
[root@rac1 ~]#
[root@rac1 ~]#
[root@rac1 ~]#

 

分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏 支持支持 反对反对
回复

使用道具 举报

沙发
 楼主| 发表于 2015-8-27 15:55:58 | 只看该作者

手工执行解锁:也报错:

 

   [root@rac1 ~]# /u01/app/grid/product/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/grid/product/11.2.0/grid/crs/install) at /u01/app/grid/product/11.2.0/grid/crs/install/crsconfig_lib.pm line 703.
BEGIN failed--compilation aborted at /u01/app/grid/product/11.2.0/grid/crs/install/crsconfig_lib.pm line 703.
Compilation failed in require at /u01/app/grid/product/11.2.0/grid/crs/install/rootcrs.pl line 305.
BEGIN failed--compilation aborted at /u01/app/grid/product/11.2.0/grid/crs/install/rootcrs.pl line 305.

回复 支持 反对

使用道具 举报

板凳
 楼主| 发表于 2015-8-27 16:01:33 | 只看该作者

 

metalink上有一篇文章,

 

和这个类似,原因是:

 

In Perl 5.10 and above, the Switch module has been is deprecated

The problem has been reported in the following bug:

      Bug 18824047 - OPATCH AUTO FAILS "CAN'T LOCATE SWITCH.PM IN @INC "

 

 

解决办法:

  

To workaround the issue, please download and install Switch.pm from www.cpan.org. Then retry opatch auto.

Alternatively, use manual patch apply - refer to the patch Readme for manual instructions.

回复 支持 反对

使用道具 举报

地板
 楼主| 发表于 2018-1-5 17:01:50 | 只看该作者
最简单的办法,就是把数据库的Switch.pm拷贝替换操作系统的pm

cp $GRID_HOME/perl/lib/5.10.0/Switch.pm /usr/lib64/perl5/.

之后,执行补丁升级前,加上perl的路径,比如:
/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
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|手机版|小黑屋|重庆思庄Oracle、Redhat认证学习论坛 ( 渝ICP备12004239号-4 )

GMT+8, 2024-11-27 17:49 , Processed in 0.095844 second(s), 20 queries .

重庆思庄学习中心论坛-重庆思庄科技有限公司论坛

© 2001-2020

快速回复 返回顶部 返回列表