sqlplus: error while loading shared libraries: /u01/app/oracle/product/11.1.0/db_1/lib/libnnz11.so: cannot restore segment prot after reloc: Permission denied

Immediately after a successful RDBMS installation (perhaps even including a sample DB instance creation), sqlplus will not start:

[oracle@test ~]$ sqlplus ‘/as sysdba’
sqlplus: error while loading shared libraries: /u01/app/oracle/product/11.1.0/db_1/lib/libnnz11.so: cannot restore segment prot after reloc: Permission denied

The reason is that SELinux is running in “enforcing” mode.

You can check it on file /etc/pam.d/login

Oracle development has recommended the following workaround while they correct the problem:

Switch SELinux from the default “Enforcing” mode that it is running in, to the “Permissive” mode.

Commands, as root:
======================
getenforce       (returns “Enforcing”)
setenforce 0
getenforce       (returns “Permissive”)

This allows SELinux to continue running, and logging denial messages, but SELinux will not actually deny any operations. Once Development has resolved this issue, you can (and should) return SELinux to the default “Enforcing” mode as follows:

Commands, as root:
======================
setenforce 1
getenforce       (returns “Enforcing”)

20 comments

  1. awesome! thanks a bunch… I had same problem after installing Db 11gR2 (11.2.0.1.0) on OEL 5.5. — setenforce to 0 solve these 2 issues:

    ./lsnrctl status
    -bash-3.2$ cd /oracle01/app/oracle/product/11.2.0/oradba/bin
    -bash-3.2$ ./lsnrctl status
    ./lsnrctl: error while loading shared libraries: /oracle01/app/oracle/product/11.2.0/oradba/lib/libclntsh.so.11.1: cannot restore segment prot after reloc: Permission denied
    -bash-3.2$

    and

    -bash-3.2$ sqlplus / as sysdba
    sqlplus: error while loading shared libraries: /oracle01/app/oracle/product/11.2.0/oradba/lib/libclntsh.so.11.1: cannot restore segment prot after reloc: Permission denied
    -bash-3.2$

    thanks a lot… 🙂

  2. i disabled the SELinux using the root user ( echo 0 >/selinux/enforce) and being able to use the sqlplus . thank you very much

  3. [root@lin01 ~]# setenforce 0
    setenforce: SELinux is disabled
    [root@lin01 ~]# sudo su – oracle
    [oracle@lin01 ~]$ sqlplus ‘/as sysdba’
    sqlplus: error while loading shared libraries: /u01/app/oracle/product/11.2/db_1/lib/libclntsh.so.11.1: file too short
    [oracle@lin01 ~]$

    Did not work for me. Any other advise would be greatly appreciated!!

  4. Sir i have some problem please help
    Error while loading shared libraries :/oracle/app/product/10.2.0/db_1/lib/libnnzll.so: file is too short

Leave a Reply