动态链接库加载出错:cannot restore segment prot after reloc: Permission denied

在执行可执行程序时,出现动态链接库加载出错:cannot restore segment prot after reloc: Permission denied。

 主要是由于Linux 内核中提供的强制访问控制 (MAC)系统SELINUX的原因。

解决办法:通过root身份,通过命令更改SELinux的模式。

相关的命令:

root身份,通过以下命令查询SELinux的模式

getenforce :查询SELinux当前的模式。

setenforce : 更改SELinux当前的模式。(此处使用setenforce 0)

chcon:更改文件的SELinux安全级别。

原文地址:https://www.cnblogs.com/syru/p/3408766.html