18c rac centos 7.1上安装2020年10月份psu补丁,遇到 can't locate cwd.pm 报错。
正常情况下30分钟就能把gi、db补丁都打上了。
[root@db1 31748523]# /u01/app/18.3/grid/opatch/opatchauto apply /soft/31748523 -oh /u01/app/18.3/grid
opatchauto session is initiated at wed dec 2 21:45:49 2020
system initialization log file is /u01/app/18.3/grid/cfgtoollogs/opatchautodb/systemconfig2020-12-02_09-45-54pm.log.
会话日志文件是/u01/app/18.3/grid/cfgtoollogs/opatchauto/opatchauto2020-12-02_09-46-18pm.log
can't locate cwd.pm: /root/perl5/lib/perl5/cwd.pm: (null) at /u01/app/18.3/grid/opatch/auto/database/bin/remotehostexecutor.pl line 2.
begin failed--compilation aborted at /u01/app/18.3/grid/opatch/auto/database/bin/remotehostexecutor.pl line 2.
oracle.dbsysmodel.driver.sdk.productdriver.productdriverexception: unable to execute command :
can't locate cwd.pm: /root/perl5/lib/perl5/cwd.pm: (null) at /u01/app/18.3/grid/opatch/auto/database/bin/remotehostexecutor.pl line 2.
begin failed--compilation aborted at /u01/app/18.3/grid/opatch/auto/database/bin/remotehostexecutor.pl line 2.
opatchauto 失败。
opatchauto session completed at wed dec 2 21:46:19 2020
time taken to complete the session 0 minute, 30 seconds
opatchauto failed with error code 42
解决参考1:
[root@pw ~]# find / -name "cwd.pm"
/usr/lib64/perl5/vendor_perl/cwd.pm
/oracle/oracle/product/db12c/perl/lib/5.22.0/x86_64-linux-thread-multi/cwd.pm
/oracle/12.2/product/grid12c/perl/lib/5.22.0/x86_64-linux-thread-multi/cwd.pm
# export perl5lib=/oracle/12.2/product/grid12c/perl/lib/5.22.0/x86_64-linux-thread-multi/
引自:
解决参考2:
there could be a problem with the 'perl5lib' environment variable.
>>> dont see this error in node2 though <<<
check the value of 'perl5lib' and compare against node 2.
set the 'perl5lib' as appropriate so as to access the lib 'strict.pm' and ensure the 'path' variable is able to reach this. note that this is found under both perl5 and gi home.
for example -
ls -l /usr/share/perl5/strict.pm
ls -l //perl/lib//strict.pm
export perl5lib=//perl/lib/:/usr/share/perl5/
export path=$path://perl/lib/:/usr/share/perl5/
引自:https://community.oracle.com/mosc/discussion/4339154/opatchauto-error-cant-locate-cwd-pm-root-perl5-lib-perl5-cwd-pm
安装完毕后:
[grid@db1 ~]$ opatch lspatches
31738083;tomcat release update 18.0.0.0.0 (31738083)
31734764;acfs release update 18.12.0.0.0 (31734764)
31734716;ocw release update 18.12.0.0.0 (31734716)
31730250;database release update : 18.12.0.0.201020 (31730250)
28655963;dbwlm release update 18.4.0.0.0 (28655963)
27923415;ojvm release update: 18.3.0.0.180717 (27923415)
opatch succeeded.
[oracle@db1 ~]$ opatch lspatches
31734716;ocw release update 18.12.0.0.0 (31734716)
31730250;database release update : 18.12.0.0.201020 (31730250)
27923415;ojvm release update: 18.3.0.0.180717 (27923415)
opatch succeeded.
应该是路径问题,一开始看了一下的确没有这个cwd.pm文件,创建目录,从/u01下搜了一个拷贝一个过去,还是不行。上mos上直接搜不到,百度搜了几个也不合适,还是科学上网了一下,找到上述两个方案,都是一个意思设置perl5lib 这个环境变量(通常是grid用户的$oracle_home/perl/lib/5.22.0/x86_64-linux-thread-multi/)再打补丁,这次差点被百度耽误了。
阅读(3560) | 评论(0) | 转发(0) |