Tuesday, November 27, 2012

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

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

or

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


problem :

SELinux is enable

Solution:

two ways to overcome this

First  : Disable the SELinux

Second : (i prefer this)

Configure SELinux to allow /u0/app/oracle/product/11.2.0/db_1/lib/libclntsh.so.11.1 using below command


chcon -t textrel_shlib_t '/u01/app/oracle/product/11.2.0/db_1/lib/libclntsh.so.11.1'

Note: change path as per your present directory structure 

11 comments:

  1. Many thanks, i got this error while trying to start listener
    [oracle@dev ~]$ lsnrctl start
    lsnrctl: error while loading shared libraries: /u01/app/oracle/product/11.2.0/dbhome_1/lib/libclntsh.so.11.1:
    cannot restore segment prot after reloc: Permission denied


    To solve it, i did the following
    from my terminal, i typed

    getenforce

    it displayed Enforcing

    It was solved by setting SELINUX=permissive in /etc/selinux/config file.

    then i typed chcon -t textrel_shlib_t '/u01/app/oracle/product/11.2.0/dbhome_1/lib/libclntsh.so.11.1'

    an that solved it

    ReplyDelete
  2. Many Many Thanks.......i got the error

    ReplyDelete
  3. Thank you gurjeet singh sir, I faced this error.
    Now resolved with your command.

    ReplyDelete
  4. Hi sir,
    As per your solution i did it same way..but i have getting following error...
    [oracle@localhost ~]$ chcon -t textrel_shlib_t '/oracle/app/oracle/product/11.2.0/db_1/lib/libclntsh.so.11.1'
    chcon: can't apply partial context to unlabeled file `/oracle/app/oracle/product/11.2.0/db_1/lib/libclntsh.so.11.1'

    Please help in this case how to start this isse and hw cud i start my database?

    ReplyDelete
  5. The main problem is that ...
    [oracle@localhost ~]$ ./sqlplus
    -bash: ./sqlplus: No such file or directory

    ReplyDelete
  6. Hi Aniket Khismatrao .. .... try to execute command from "root" user and then comment your output

    ReplyDelete
  7. Thanks' a lot for
    sqlplus: error while loading shared libraries: /u01/app/oracle/product/11.2.0/db_1/lib/libclntsh.so.11.1: cannot restore segment prot after reloc: Permission denied
    or
    sqlplus: error while loading shared libraries: /u01/app/oracle/product/11.2.0/dbhome_1/lib/libclntsh.so.11.1: cannot restore segment prot after reloc: Permission denie

    For giving solution

    ReplyDelete
    Replies
    1. it's solution works successfully.
      Type in linux terminal window by login as ROOT User.
      chcon -t textrel_shlib_t '/u01/app/oracle/product/11.2.0/db_1/lib/libclntsh.so.11.1'



      Delete

web stats