共計 1225 個字符,預計需要花費 4 分鐘才能閱讀完成。
今天就跟大家聊聊有關 sqlplus: error while loading shared libraries 的解決方案是什么,可能很多人都不太了解,為了讓大家更加了解,丸趣 TV 小編給大家總結了以下內容,希望大家根據這篇文章可以有所收獲。
昨天在給學員培訓時,安裝完畢數據庫后,執(zhí)行 sqlplus 出現(xiàn)了如下錯誤。
建好 oracle 庫后,執(zhí)行 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 的狀態(tài),若為 Enforcing 表示 SELinux 為開啟狀態(tài)
[root@mydb]# getenforce
Enforcing
(2)執(zhí)行 setenforce 0 將 SELinux 設為 permissive 模式(即臨時關閉 SElinux)
[root@mydb]# setenforce 0
(3)驗證上步操作的結果
[root@mydb]# getenforce
Permissive
這種方法的缺點是當系統(tǒng)重啟的時候,SELinux 又恢復為 Enforcing 狀態(tài),執(zhí)行 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
重啟系統(tǒng)讓設置生效:
# reboot
看完上述內容,你們對 sqlplus: error while loading shared libraries 的解決方案是什么有進一步的了解嗎?如果還想了解更多知識或者相關內容,請關注丸趣 TV 行業(yè)資訊頻道,感謝大家的支持。