Linux下共享庫問題導致無法啟動SQLPLUS的問題解決

feng_xin發表於2011-09-20
現象:
sqlplus /nolog
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
 
 
 
解決辦法:
 
這個問題是由於SELINUX引起的.
 
1. 編輯/etc/sysconfig/selinux配置檔案, 把SELINUX=enforcing 改為 SELINUX=disabled.
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#       enforcing - SELinux security policy is enforced.
#       permissive - SELinux prints warnings instead of enforcing.
#       disabled - SELinux is fully disabled.

#SELINUX=enforcing
SELINUX=disabled

# SELINUXTYPE= type of policy in use. Possible values are:
#       targeted - Only targeted network daemons are protected.
#       strict - Full SELinux protection.
SELINUXTYPE=targeted
 
2. 使用命令chcon 改變檔案或者目錄的SELinux屬性, 語法chcon -t texrel_shlib_t 庫名字
 
[oracle@null-00137223684e ~]$ sqlplus /nolog
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

[oracle@null-00137223684e ~]$ chcon -t texrel_shlib_t /u01/app/oracle/product/11.2.0/dbhome_1/lib/libclntsh.so.11.1

[oracle@null-00137223684e ~]$ sqlplus /nolog
SQL*Plus: Release 11.2.0.1.0 Production on Tue Sep 20 14:31:21 2011
Copyright (c) 1982, 2009, Oracle.  All rights reserved.
SQL>
 
如果執行過程中發現其它的庫檔案也報類似的錯誤, 可以使用同樣的方法來解決.

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

相關文章