I applied the agent patch successfully after commenting out $GENOCCISH as suggested by you but now when i am about to apply the RDBMS patch i set my environment export ORACLE_HOME=/u01/OID(RDBMS OH) which is different from my agent OH(/oracle/product/agent10g/agent10g) export PATH=$PATH:$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:.
and did opatch lsinventory thats when i got this error.

Error occurred during initialization of VM
Unable to load native library: permission denied.

Now when you say i need to relink the agent i am kind of confused as this is RDBM patch which needs to be run against its OH ,so please clarify it

./emctl stop agent

cd $ORACLE_HOME/sysman/lib

and then relink the agent

make -f ins_emagent.mk agent

and then run the root.sh script from oracle home
$./root.sh

and the start the agent again

./emctl start agent

then try using opatch again.
what should be my OH when applying RDBMS patch i think it should be rdbms OH ?please can you clarify on this