sqlplus: error while loading shared libraries: libclntsh.so.11.1


sqlplus: error while loading shared libraries: cannot restore segment prot after reloc: Permission denied

Applies to:

Oracle Enterprise Linux 5.5
Database 11gR1

Description:

I am using Oracle Enterprise Linux 5.5 and install Oracle Database 11gR1. After successfull installation of OS and Database when I try to login database it give me the following error:


sqlplus / as sysdba
sqlplus: error while loading shared libraries: /d01/app/oracle/product/11.2.0/dbhome_1/lib/libclntsh.so.11.1: cannot restore segment port after reloc: Permission denied



Solution:

Reason of the above error because of SELinux is running in ENFORCING mode, Oracle development has recommended the following workaround while they correct the problem. To check the mode execute the following command from root user:


root> getenforce
Enforcing

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

root> setenforce 0

Now check again:

root> getenforce
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

Now successfully connect to SQL:

 sqlplus / as sysdba

SQL*Plus: Release 11.2.0.1.0 Production on Tue Oct 30 11:56:08 2012

Copyright (c) 1982, 2009, Oracle.  All rights reserved.

Connected to an idle instance.

SQL> startup;
ORACLE instance started.

Total System Global Area 4275781632 bytes
Fixed Size                  2220200 bytes
Variable Size            1728057176 bytes
Database Buffers         2533359616 bytes
Redo Buffers               12144640 bytes
Database mounted.
Database opened.
SQL> 


Your comments, especially which will help us improve the functionality, will be greatly appreciated :)

Comments

  1. Thanks for sharing useful information. I've a question, does Oracle normally recommends to disable SELinux, I read it somewhere and did so on my server.

    ReplyDelete
    Replies
    1. Hello Ahmed,

      Kindly view Metalink Doc ID 454196.1, which provide workaround to fix it immediately or apply a patch.

      Thanks

      Delete
  2. There are four shared libraries in the distribution , have to compile using Intel ICC compiler ,and those libraries perform relocation
    so Oracle recommended SELINUX should be disable .
    you can find these libraries by setting SELINUX to "permissive" which will log errors but allow actions SELINUX would otherwise deny.Now use audit2allow command or leave
    leave SELINUX in "enforcing" mode use SELINUX troubleshooter to determine each error and troubleshooting report to fix.
    www.tcpak.com

    ReplyDelete

Post a Comment

Popular posts from this blog

How to Rebuild/Recreate Concurrent Manager

FRM-92101: Forms Server Not Starting Up

ORA-10564 Tablespace UNDOTBS1 ORA-01110 ORA-10560