Oracle Spin – Flimatech Blog

Sharing Our Database Experience

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

Posted by Alex Lima on April 28, 2009

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”)

About these ads

10 Responses to “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”

  1. Kit said

    Command setenforce 0
    solved the problem.

  2. Hasan Raihan said

    Solved my problem. Thank u very much Lidia Lima.

  3. Mauro Paludeti said

    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… :)

  4. marc guentgen said

    helped me for centos on virtualbox too. thank you very much.

  5. Ahmed Zeidan said

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

  6. Suraj said

    This worked! Thanks a lot.

  7. This problem will help on RHEL 5
    I simpally run
    at root
    getenforce
    setenforce 0
    getenforce

    and the problem is solved…..
    thanks a lot!!!!

  8. Andrew_IF said

    RHEL 5.5 solves the problem. Thank you!

  9. hariganesh said

    superb, Than Q very much

  10. ali said

    thanks it works for me.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
Follow

Get every new post delivered to your Inbox.

Join 41 other followers

%d bloggers like this: