下載下傳了一個eclipse for cpp的版本,在centos 上運作,報權限不足的錯誤.
[[email protected] eclipse]# ./eclipse
/usr/local/jdk1.6.0_17/bin/../jre/lib/i386/client/libjvm.so: cannot restore segment prot after reloc: 權限不夠
檢視自己的jvm,eclipse都是有可執行權限的,網上找了下,據說是問題是安全級别和防火牆導緻的,
解決辦法:
注釋#SELINUX=enforcing
添加SELINUX=disabled
或從 系統->管理->安全級别和防火牆->SELinux ->禁用
vi /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 disablied.
#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
其中紅色的是要改掉的部分.這樣重新開機linux,eclipse就可以正常了.
關于SELINUX的解釋,
SELinux(Security-Enhanced Linux) 是美國國家安全局 (NSA)對于強制通路控制的實 現,是 Linux® 上最傑出的新本機安全性授權。NSA是在Linux社群的幫助下開發了一種通路控制體系,在這種通路控制體系的限制下,程序隻能通路那些在他的任務中所需要文 件。SELinux 預設安裝在 Fedora 和 Red Hat Enterprise Linux 上,也可以作為其他發行版上容易安裝的包得到。
更詳細的解釋可以參考百度詞條.
http://baike.baidu.com/view/487687.htm