动态库加载出错,cannot restore segment prot after reloc: Permission denied
转自:taolinke的博客
项目中碰到的问题,编译好的so文件,放到其他机器上去加载,报了错误,cannot restore segment prot after reloc: Permission denied。
网上查了一下,原因是selinux的问题,selinux的设置太过严格导致的。解决的办法是在root用户下,修改/etc/selinux/config 文件,
- 把SELINUX=enforcing 改成 SELINUX=disabled。
然后,保存关闭,重启机器就可以了。
另外还有一个暂时关闭的方法,就是 /usr/sbin/setenforce 0 。
此外呢,我自己在犄角旮旯里发现了另外一个方法,举个例子,你碰到问题的so文件是test.so,
那么
- chcon -t texrel_shlib_t test.so
就可以了。不过呢,这个命令只能修改一个so,如果想让你的系统以后都不会碰到这个错误,那最好还是采用修改文件
的方式。
动态库加载出错,cannot restore segment prot after reloc: Permission denied的更多相关文章
- 动态链接库加载出错:cannot restore segment prot after reloc: Permission denied
在执行可执行程序时,出现动态链接库加载出错:cannot restore segment prot after reloc: Permission denied. 主要是由于Linux 内核中提供的强 ...
- cannot restore segment prot after reloc: Permission denied
编辑/etc/selinux/config,找到这段:# This file controls the state of SELinux on the system. # SELINUX= can t ...
- 在linux下出现cannot restore segment prot after reloc: Permission denied
应用程序连接oracle的库时会出现如下错误:XXXXX:: error while loading shared libraries: /usr/local/oracle/product/10.2. ...
- 运行java -version报cannot restore segment prot after reloc: Permission denied
linux 安装jdk1.6后,运行java -version,没有出现相关的版本信息,而是出现了以下错误: dl failure on line 685Error: failed /usr/loca ...
- linux 启动oracle报cannot restore segment prot after reloc: Permission denied
error while loading shared libraries: $ORACLE_HOME/lib/libnnz10.so: cannot restore segment prot afte ...
- lsnrctl: .... cannot restore segment prot after reloc: Permission denied
cannot restore segment prot after reloc: Permission denied Table of Contents 1. 错误信息 2. 解决方法 1 错误信息 ...
- linux动态库加载RPATH, RUNPATH
摘自http://gotowqj.iteye.com/blog/1926771 linux动态库加载RPATH, RUNPATH 链接动态库 如何程序在连接时使用了共享库,就必须在运行的时候能够找到共 ...
- libdl.so 动态库加载、查找
使用libdl.so库 动态库加载原理 动态库中函数的查找已经封装成 libdl.so,有4个函数: dlopen : 打开一个动态库 dlsym : 在打开的动态库里找一个函数 dlclo ...
- linux和windows动态库加载路径区别
# linux和windows动态库加载路径区别 ### 简介------------------------------ linux加载动态库的路径是系统目录/lib和/usr/lib.- wind ...
随机推荐
- strlen和mb_strlen区别
转自:http://blog.sina.com.cn/s/blog_5f0d5bd90100mzcl.html <?php//测试时文件的编码方式要是UTF8$str='中文a字1符';echo ...
- Mysql高级之存储过程
参考地址1:http://www.2cto.com/database/201411/350819.html 参考地址2:http://www.jb51.net/article/39471.htm my ...
- 关于网站IIS日志分析搜索引擎爬虫说明
正文:iis默认的日志文件在C:\WINDOWS\system32\LogFiles中,下面是Seoer惜缘的服务器日志,通过查看,就可以了解搜索引擎蜘蛛爬行经过,如: 2008-08-19 00:0 ...
- Careercup - Google面试题 - 5085331422445568
2014-05-08 23:45 题目链接 原题: How would you use Dijkstra's algorithm to solve travel salesman problem, w ...
- MySQL数据库远程连接开启方法
有时候需要远程连接mysql数据库,默认是不可以的,可以参考下面的方法,解决下. 1.登陆自己机器的MySQL数据库:mysql -uroot -p密码 设置root用户可以任意IP访问,代码如下(可 ...
- 菜鸟搭建Android环境~~~~绝对靠谱
因为要测试移动设备.搭建了一下Android环境 这是菜鸟级别的安装 因为sdk版本,eclipse版本,adt版本各自有版本要求,所以我选择都去官网下载新版本,这样总不会出现版本兼容性问题了吧~~ ...
- Codeforces Beta Round #69 (Div. 1 Only) C. Beavermuncher-0xFF 树上贪心
题目链接: http://codeforces.com/problemset/problem/77/C C. Beavermuncher-0xFF time limit per test:3 seco ...
- 01.安装Memcached
1.安装Memcached 1.下载Memcached及其依赖 下载memcached-1.4.24.tar.gz和libevent-2.0.22-stable.tar.gz文件并解压如下: [liz ...
- 【BZOJ】【1012】【JSOI2008】最大数maxnumber
线段树 ……现在再来看这题感觉好水啊,当年的大老虎现在也变成小花猫了,真是令人感动<_< /************************************************ ...
- asp.net 分布式缓存
之前Velocity已被 集成到App Fabric(包含有WCF监控==)中. 网络Velocity使用大多是针对老版本: 老版本的下载地址: http://www.microsoft.co ...