今天在Linux上安裝eclipse,啟動報錯:
cannot restore segment prot after reloc: Permission denied
****.so(此為某路徑下的某檔案)
解決辦法
編輯/etc/selinux/config,找到這段:
# 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=enforcing 注釋掉:#SELINUX=enforcing ,然後新加一行為:
SELINUX=disabled
儲存,關閉。
......
編輯/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
如果SELINUX已經是 SELINUX=disabled,那麼就不用改了,否則就把SELINUX=enforcing 注釋掉,新加一行:
SELINUX=disabled
儲存,退出。
如果你碰到其他類似提示:
cannot restore segment prot after reloc: Permission denied
那應該是SELinux的問題,可以考慮把它關閉。
-------------------------------------------------------------------------------------
鬱悶的是.我把SELinux關閉後還是不行.於是到google上search.發現這個很有用.
在你保證SElinux 被disable後.還執行下
chcon -t texrel_shlib_t ******.so
如: chcon -t texrel_shlib_t /路徑/路徑/名字.so (這個檔案視具體執行檔案.)
以上兩步.已經解決了很多server的問題了.