I encountered the following issue when I was applying a patch on one of the Oracle HTTP Server installations.
OPatch could not find OUI based inventory in the Oracle Home. But, OUI location is provided using ‘oui_loc’ option. Please check the inventory of the Oracle Home and run OPatch again.
OPatch failed with error code 255
As the error indicates the OPatch executable could not find the Oracle Home in oraInventory. At this moment, I am not sure why the Oracle Home was not registered with oraInventory in my case.
To resolve this error, we need to register the Oracle Home with the inventory using the command attachHome as follows:
[oracle@oracle 19561724]$ /u01/oracle/products/web/oui/bin/attachHome.sh
Starting Oracle Universal Installer…
Checking swap space: must be greater than 500 MB. Actual 4511 MB Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2014-11-12_04-07-29PM.
Please wait …[oracle@oracle 19561724]$ The inventory pointer is located at /etc/oraInst.loc
The inventory is located at /u01/oracle/oraInventory
‘AttachHome’ was successful.
Now if you see the file inventory.xml, you can see the entry for your ORACLE_HOME. You can run the OPatch command and you should not see this error again.