1
我在我的程序中使用dlopen()API打开共享对象。但是,得到如下错误:在dlopen()API中拒绝的权限API
cannot restore segment prot after reloc: Permission denied
我在我的程序中使用dlopen()API打开共享对象。但是,得到如下错误:在dlopen()API中拒绝的权限API
cannot restore segment prot after reloc: Permission denied
它可能是dlopen的是不能搬迁共享库的文本段。在这种情况下,我们可以更改权限以动态选择重定位。您需要使用root权限执行以下命令来更改权限。
chcon -t texrel_shlib_t <your lib path here.>
感谢您的回答,它正在工作。 –