Recently, cloning GI oracle home, I encountered into the strange error :
Some requirement checks failed. You must fulfill these requirements before
continuing with the installation,
The log of opatchauto session said that the installer couldn't create the temporary file for checking prerequisites before running opatch :
2022-02-14 19:49:06,805 INFO [107] com.oracle.glcm.patch.auto.db.integration.controller.action.DBCommonPatchAction - shell-init: error retrieving current directory: getcwd: cannot access parent directories: Permission denied
sh: /command_output_20159: cannot create
Looked strange, isn't it ? The installer tried to create the file in the root (/) directory.
The solution was unexpectable : changing current working directory to $ORACLE_HOME.
Good Luck !