>  기사  >  데이터 베이스  >  sqlplus: error while loading shared libraries未公布的b

sqlplus: error while loading shared libraries未公布的b

WBOY
WBOY원래의
2016-06-07 16:36:511382검색

今天远程帮助同事安装数据库11gR2,软件安装完毕后sqlplus 等命令调用不了 [oracle@oracle1 ~]$ sqlplus /nolog sqlplus: error while loading shared libraries: /opt/oracle/app/oracle/product/11.2.0/dbhome_1/lib/libclntsh.so.11.1: cannot restore se

今天远程帮助同事安装数据库11gR2,软件安装完毕后sqlplus 等命令调用不了<br> [oracle@oracle1 ~]$ sqlplus /nolog<br> sqlplus: error while loading shared libraries: /opt/oracle/app/oracle/product/11.2.0/dbhome_1/lib/libclntsh.so.11.1: cannot restore segment prot after reloc: Permission denied

这个错误看起来好像和linux的LD_LIBRARY_PATH相关
Export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib

指定LD_LIBRARY_PATH后还是报错,找到mos上有篇文章
./sqlplus: error on libnnz11.so: cannot restore segment prot after reloc (文档 ID 454196.1)

Changes:
ELinux is running in "enforcing" mode.

You are encountering unpublished
Bug 6140224 SQLPLUS FAILS TO LOAD LIBNNZ11.SO WITH SELINUX ENABLED ON EL5/RHEL5
Oracle Developement is actively working on this compiler version compatibility issue (ICC compilers that are used for several libraries, such as LIBNNZ10.SO and LIBNNZ11.SO) in the RHEL 5 and OEL 5 environments.
and is included within RHEL5.5
Oracle's resolution to this for 11.2.0.1 (both x86 and x86_64 ) is patch 9215184
Oracle's resolution to this is included within 11.2.0.2

这个是启用selinux的原因,我们只要关闭掉selinux即可,刚好os版本是linux 5.5的,这个bug在11.2.0.2已经得到了解决,而小鱼安装的正是11.2.0.1版本

相应的办法是我们直接禁掉selinux即可
[root@ oracle1 ~]# /usr/sbin/setenforce 0
修改/etc/sysconfig/selinux
[root @ oracle1 ~]$ less /etc/sysconfig/selinux
# 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 -- 修改enforcing为disabled
# SELINUXTYPE= type of policy in use. Possible values are:
# targeted - Only targeted network daemons are protected.
# strict - Full SELinux protection.
SELINUXTYPE=targeted

再次sqlplus使用已经正常。

성명:
본 글의 내용은 네티즌들의 자발적인 기여로 작성되었으며, 저작권은 원저작자에게 있습니다. 본 사이트는 이에 상응하는 법적 책임을 지지 않습니다. 표절이나 침해가 의심되는 콘텐츠를 발견한 경우 admin@php.cn으로 문의하세요.