问题信息:
error while loading shared libraries:
/opt/IBM/db2/V8.1/lib/libdb2trcapi.so.1: cannot restore segment prot
after reloc: Permission denied
1.环境
Linux localhost.localdomain 2.6.18-8.el5 #1 SMP Fri Jan 26 14:15:21 EST 2007 i686 i686 i386 GNU/Linux
2.解决方案
sudo chcon -t texrel_shlib_t /opt/IBM/db2/V8.1/lib/libdb2trcapi.so.1
若有其他库文件则直接:
sudo chcon -t texrel_shlib_t /opt/IBM/db2/V8.1/lib/*.so
3.若是还不行直接关闭SELinux
setenforce [ Enforcing | Permissive | 1 | 0 ]
setenforce 0 关闭不用重启.
一下修改需要重启:
编辑/etc/selinux/config,找到这段:
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - SELinux is fully disabled.
SELINUX=enforcing
把 SELINUX=enforcing 注释掉:#SELINUX=enforcing ,然后新加一行为:
SELINUX=disabled
保存,关闭。
阅读(1906) | 评论(0) | 转发(0) |