简体   繁体   中英

Permission denied in dlopen() API

I am opening a shared object in my program, using dlopen() API. But getting below error:

cannot restore segment prot after reloc: Permission denied

It may be possible that dlopen is not able to relocate the text segment of your shared library. In such case we can change the permission to dynamically select the relocation. you need to execute the following command with root permission to change the permission.

chcon -t texrel_shlib_t <your lib path here.>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM