代码改变世界

Oracle 19c静默安装遇到 Cannot access inventory of the Oracle Home案例

2026-09-08 16:47  潇湘隐者  阅读(16)  评论(0)    收藏  举报

Oracle 19c静默安装过程中遇到下面错误:

$ more opatchauto_2026-09-08_16-15-22_binary.log 
2026-09-08 16:15:22,187 INFO  [1] oracle.opatchauto.core.binary.OACLogger - 
===============START of Binary Session================

2026-09-08 16:15:22,188 INFO  [1] oracle.opatchauto.core.binary.OACLogger - 
Oracle Home : /opt/oracle19c/product/19.3.0/db
2026-09-08 16:15:22,190 INFO  [1] oracle.opatchauto.core.binary.OACLogger - 
OPatchAuto binary patching Tool
Copyright (c)2014, Oracle Corporation. All rights reserved.

OPatchauto Version : 13.9.4.2.0
Running from       : /opt/oracle19c/product/19.3.0/db

2026-09-08 16:15:22,191 INFO  [1] oracle.opatchauto.core.binary.OACLogger - 
Java Home : /opt/oracle19c/product/19.3.0/db/OPatch/jre
2026-09-08 16:15:22,191 INFO  [1] oracle.opatchauto.core.binary.OACLogger - 
Command-line Arguments : [apply, /flipuatdb/soft/39472050, -no_relink, -binary, -oh, /opt/oracle19c/product/19.3.0/db]
2026-09-08 16:15:22,193 INFO  [1] oracle.opatchauto.core.binary.OACLogger - 
This is not a SystemPatch: "/flipuatdb/soft/39472050"
2026-09-08 16:15:30,716 INFO  [1] oracle.opatchauto.core.binary.OACLogger - 
Patch selected: /flipuatdb/soft/39472050

2026-09-08 16:15:31,092 FINEST [1] com.oracle.cie.common.dao.jaxb.JaxbDataHandlerSpiImpl - Located schema for namespace=http://xmlns.oracle.com/oui/options id=o
ptions-info, enabling unmarshalling validation.
2026-09-08 16:15:31,169 SEVERE [1] oracle.opatchauto.core.binary.OACLogger - 
OPatchAutoBinary hit an Exception: oracle.opatch.opatchsdk.OPatchException: Cannot access inventory of the Oracle Home..
2026-09-08 16:15:31,170 INFO  [1] oracle.opatchauto.core.binary.OACLogger - 
oracle.opatch.opatchsdk.OPatchException: Cannot access inventory of the Oracle Home..oracle.opatch.opatchsdk.OPatchContext.loadInventory(OPatchContext.java:613)
oracle.opatch.opatchsdk.OPatchContext.<init>(OPatchContext.java:570)
oracle.opatch.opatchsdk.OPatchContext.getInstance(OPatchContext.java:212)
oracle.opatchauto.core.binary.OPatchAutoBinary.<init>(OPatchAutoBinary.java:97)
oracle.opatchauto.core.OPatchAutoCore.runOPatchAutoBinary(OPatchAutoCore.java:179)
oracle.opatchauto.core.OPatchAutoCore.main(OPatchAutoCore.java:74)

遇到这个错误,是因为这台服务器之前被我各种折腾过(测试脚本自动安装Oracle),环境中有些残留文件没有删除.

$ cat /etc/oraInst.loc
inventory_loc=/opt/oracle19c/oraInventory
inst_group=oinstall

可以将这个文件/etc/oraInst.loc重命令或删除后,重新执行安装命令即可.

参考资料

Cannot Access Inventory Of The Oracle Home KB718686