在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
[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/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/27771627/viewspace-1269056/