sqlplus: error while loading shared libraries的解决方案是什么

发布时间:2021-12-08 14:40:42 作者:柒染
来源:亿速云 阅读:411

今天就跟大家聊聊有关sqlplus: error while loading shared libraries的解决方案是什么,可能很多人都不太了解,为了让大家更加了解,小编给大家总结了以下内容,希望大家根据这篇文章可以有所收获。

昨天在给学员培训时,安装完毕数据库后,执行sqlplus出现了如下错误。
建好oracle库后,执行sqlplus命令:
[oracle@localhost database]$ sqlplus /nolog
sqlplus: error while loading shared libraries: /oracle/app/product/11.2.0/lib/libclntsh.so.11.1: cannot restore segment prot after reloc: Permission denied


问题原因:安装LINUX时开启了SELinux


解决方案:关闭SELinux

第一种方法
(1)查看SELinux的状态,若为Enforcing表示SELinux为开启状态
[root@mydb]# getenforce
Enforcing

(2)执行setenforce 0将SELinux设为permissive模式(即临时关闭SElinux)
[root@mydb]# setenforce 0

(3)验证上步操作的结果
[root@mydb]# getenforce
Permissive

这种方法的缺点是当系统重启的时候,SELinux又恢复为Enforcing状态,执行sqlplus仍然会报错。

第二种方法
用root账户将/etc/selinux/config中的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=disabled
# SELINUXTYPE= type of policy in use. Possible values are:
#       targeted - Only targeted network daemons are protected.
#       strict - Full SELinux protection.
SELINUXTYPE=targeted

重启系统让设置生效:
# reboot

看完上述内容,你们对sqlplus: error while loading shared libraries的解决方案是什么有进一步的了解吗?如果还想了解更多知识或者相关内容,请关注亿速云行业资讯频道,感谢大家的支持。

推荐阅读:
  1. java中exception和Error的不同
  2. Mongoose经常返回e11000 error的原因分析

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

error sqlplus

上一篇:ORA-39213: Metadata processing is not available的解决方案是什么

下一篇:如何来使用json4s

相关阅读

您好,登录后才能下订单哦!

密码登录
登录注册
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》