libclntsh.so.11.1:cannot restore segment prot after reloc:Permission denied 報錯

liuzhen_basis發表於2014-09-13
在oracle  bin目錄下執行命令報錯

[oracle@standby bin]$ ./lsnrctl status
./lsnrctl: error while loading shared libraries: /home/oracle/app/oracle/product/11.2.0/dbhome_1/lib/libclntsh.so.11.1: cannot restore segment prot after reloc: Permission denied


oracle@standby bin]$ ./sqlplus
./sqlplus: error while loading shared libraries: /home/oracle/app/oracle/product/11.2.0/dbhome_1/lib/libclntsh.so.11.1: cannot restore segment prot after reloc: Permission denied


是selinux導致

解決方法

執行以下兩條命令,或者完全關掉selinux
[root@standby ~]# semanage fcontext -a -t textrel_shlib_t  /home/oracle/app/oracle/product/11.2.0/dbhome_1/lib/libclntsh.so.11.1

[root@standby ~]# restorecon -R -v /home/oracle/app/oracle/product/11.2.0/dbhome_1/lib/libclntsh.so.11.1
restorecon reset /home/oracle/app/oracle/product/11.2.0/dbhome_1/lib/libclntsh.so.11.1 context root:object_r:user_home_t:s0->system_u:object_r:textrel_shlib_t:s0

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/27771627/viewspace-1269056/,如需轉載,請註明出處,否則將追究法律責任。

相關文章