Tuesday, October 11, 2011

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

After install Oracle 11g on Linux while the SELinux was enabled I tried to open sqlplus to start connecting to the database I got this error:

"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"

Error Description:

SELinux is preventing sqlplus from loading /u0/app/oracle/product/11.2.0/db_1/lib/libclntsh.so.11.1 which requires text relocation.

To solve this error:
Configure SELinux to allow /u0/app/oracle/product/11.2.0/db_1/lib/libclntsh.so.11.1 using this command

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

12 comments:

Mirnalini said...

Thanks for sharing this hint ...

hardikjethava said...

Thanks for sharing this useful link.

I was getting almost same error for lsnrctl utility.

I have run the command given by you and now everything is working fine.Thank you.

Unknown said...

Thank you !

Unknown said...

Thank you

Unknown said...

Hi,I get the sql Plus error while loading shared libraries.Thanks...

-Aparna
Theosoft

Anonymous said...

Thanks for the help. It really works.

ravindra malwal said...

thanks

Unknown said...

thanks ahmed bhai

Unknown said...

thanks ahmed bhai

Unknown said...

assalamu alaikum ahmad bhai mera error toh solve hogaya aap jo command bole wo my follow kara. magar wo commans kyun dere wo samaj me nai aya, can you explain

Unknown said...

You saved my backside. This worked with my oracle client too and I was able to finish an upgrade before their tech support could call me back.

Unknown said...

Thank you a lots....I have searched so many in google & youtube...But didn't get answer....But from you I have got the answer..It is amazing ...Thanks you once again brother Ahmed Abd El Latif...