---
title: "Oracle 11g安装报错cannot restore segment prot after reloc: Permission denied(转)"
author: "foolraty"
date: "2014-09-02T17:15:40Z"
tags: []
categories: ["数据库"]
slug: "oracle-11g-cannot-restore-segment-prot-after-reloc-permission-denied"
draft: false
lastmod: "2014-09-02T17:15:40Z"
id: 2112133
url: "https://foolraty.iteye.com/blog/2112133"
---

**Oracle 11g安装报错cannot restore segment prot after re**

主要原因是selinux限制监听器的包的访问

http://www.enkj.com/help/newscontent/98837

Oracle 11g安装报错cannot restore segment prot after reloc: Permission denied  
\[日期：2012-07-28] 来源：Linux社区  作者：mfkqwyc86

   
环境：  
RedHat Linux AS5.7 +Oracle11.2.0.1 X86\_64位环境  
   
安装完Oracle11.2.0.1后，通过netca创建监听程序，然后执行lsnrctl status，报错如下：  
   
\[Oracle @bt bin]#lsnrctl status  
 ./lsnrctl: error while loading shared libraries: /Oracle/ora11g/product/11.2.0/dbhome\_1/lib/libclntsh.so.11.1: cannot restore segment prot after reloc: Permission denied-  
 

解决过程如下：  
\[root@bt bin]#semanage fcontext -a -t textrel\_shlib\_t /Oracle/ora11g/product/11.2.0/dbhome\_1/lib/libclntsh.so.11.1  
    csvn homedir /opt/CollabNet\_Subversion or its parent directory conflicts with a defined context in /etc/selinux/targeted/contexts/files/file\_contexts, /usr/sbin/genhomedircon will not create a new context. This usually indicates an incorrectly defined system account. If it is a system account please make sure its login shell is /sbin/nologin.  
\[root@bt bin]# restorecon -R -v /Oracle/ora11g/product/11.2.0/dbhome\_1/lib/libclntsh.so.11.1  
    restorecon reset /home/mnum/app/mnum/product/11.2.0/dbhome\_1/lib/libclntsh.so.11.1 context user\_u:object\_r:user\_home\_t:s0-&gt;system\_u:object\_r:textrel\_shlib\_t:s0  
   
重新执行lsnrctl status，问题解决。