Wednesday, August 24, 2011

How to resolve "cannot restore segment prot after reloc: Permission denied"?

[oracle@MyUnixBox admin]$ sqlplus "/ as sysdba"
sqlplus: error while loading shared libraries: /opt/ora11g/lib/libsqlplus.so: cannot restore segment prot after reloc: Permission denied
Error post relink all :-

[oracle@MyUnixBox admin]$ sqlplus "/ as sysdba"
sqlplus: error while loading shared libraries: /opt/ora11g/lib/libclntsh.so.11.1: cannot restore segment prot after reloc: Permission denied

[oracle@MyUnixBox admin]$ lsnrctl status
opt/ora11g/bin/tnslsnr: error while loading shared libraries: /opt/ora11g/lib/libons.so: cannot restore segment prot after reloc: Permission denied
TNS-12547: TNS:lost contact
TNS-12560: TNS:protocol adapter error
  TNS-00517: Lost contact
   Linux Error: 32: Broken pipe

Solution :-

as oralce :- relink all

as root :-

[root@MyUnixBox ~]# getenforce
Enforcing
[root@MyUnixBox ~]# setenforce 0
[root@MyUnixBox ~]# getenforce
Permissive

as oracle :-

[root@MyUnixBox ~]# /usr/sbin/semanage fcontext -a -t textrel_shlib_t $ORACLE_HOME/lib/libclntsh.so.11.1
[root@MyUnixBox ~]# /sbin/restorecon /opt/ora11g/lib/libclntsh.so.11.1

No comments:

Post a Comment