现在的位置: 首页 > 综合 > 正文

关于cannot restore segment prot after reloc: Permission denied 的解决方案

2013年10月03日 ⁄ 综合 ⁄ 共 724字 ⁄ 字号 评论关闭

在运行软件时,对程序没有修改什么,但是运行的时候老是出现cannot restore segment prot after reloc: Permission denied 。即使你修改了相应文件的权限为最高权限,但还是不行。后来才发现原来是SELINUX在作怪!

 

遇到上述问题解决办法如下:

编辑/etc/selinux/config,找到这段:

# This file controls the state ofSELinux on the system.

# SELINUX= can take one of thesethree values:

# enforcing - SELinux securitypolicy is enforced.

# permissive - SELinux printswarnings instead of enforcing.

# disabled - SELinux is fullydisabled.

SELINUX=enforcing

修改SELINUX=enforcingSELINUX=disabled,保存,退出。然后重启!!

 

 

如果你碰到其他类似提示:

 cannot restore segment prot after reloc:Permission denied

 哪应该是SELinux的问题,可以考虑把它关闭。

 ————————————————————————————-

 郁闷的是.我把SELinux关闭后还是不行.于是到google上search.发现这个很有用.

 在你保证SElinux 被disable后.还执行下

 chcon -t texrel_shlib_t

 如: chcon -t texrel_shlib_t /路径/路径/名字.so (这个文件视具体执行文件.) 

 

Good Lunck!!!

抱歉!评论已关闭.