ORACLE SOS

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
查看: 6795|回复: 1

10g asmcmd无法使用,报can't load Oracle.so

[复制链接]

95

主题

266

帖子

1719

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
1719
发表于 2014-12-26 23:18:11 | 显示全部楼层 |阅读模式
网友咨询 10g的asm 设置了oracle_sid=+ASM1,后依然无法使用asmcmd登录,报错如下

install_driver(Oracle) failed: Can't load '/u01/app/oracle/product/10.2.0_1/perlb/site_perl/5.8.3/i686-linux-thread-multi/auto/DBD/Oracle/Oracle.so' for module DBD::Oracle: /u01/app/oracle/product/10.2.0_1b32bnnz10.so: cannot restore segment prot after reloc: Permission denied at /u01/app/oracle/product/10.2.0_1/perlb/5.8.3/i686-linux-thread-multi/DynaLoader.pm line 229.
at (eval 2) line 3
Compilation failed in require at (eval 2) line 3.
Perhaps a required shared library or dll isn't installed where expected
at /u01/app/oracle/product/10.2.0_1/bin/asmcmdcore line 5953

Q Q:107644445
Tel:13429648788
Email:dba@xifenfei.com
个人Blog(惜分飞)
提供专业ORACLE技术支持(数据恢复,安装实施,升级迁移,备份容灾,故障诊断,系统优化等)
回复

使用道具 举报

95

主题

266

帖子

1719

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
1719
 楼主| 发表于 2014-12-26 23:18:58 | 显示全部楼层
APPLIES TO:Oracle Server Enterprise Edition - Version: 11.1.0.6 to 11.1.0.7
This problem can occur on any platform.
ASM - Version: 11.1.0.6 to 11.1.0.7
Red Hat Advanced Server
Linux x86-64
RHEL 5 and OEL 5 only. RHEL 4 and OEL 4 are not affected. This is because of the more aggressive way that SELinux policies are enforced in RHEL 5 and OEL 5.

SYMPTOMS
Immediately after a successful ASM installation, ASMCMD will not start:
$ echo $ORACLE_HOME
/opt/oracle/10.2.0
$ export ORACLE_SID=+ASM
$ asmcmd
install_driver(Oracle) failed: Can't load '/opt/oracle/10.2.0/perl/lib/site_perl/5.8.3/i686-linux-thread-multi/auto/DBD/Oracle/Oracle.so' for module DBD::Oracle: /opt/oracle/10.2.0/lib32/libnnz10.so: cannot restore segment prot after reloc: Permission denied at /opt/oracle/10.2.0/perl/lib/5.8.3/i686-linux-thread-multi/DynaLoader.pm line 229.
at (eval 2) line 3
Compilation failed in require at (eval 2) line 3.
Perhaps a required shared library or dll isn't installed where expected
at /opt/oracle/10.2.0/bin/asmcmdcore line 5953
CHANGESSELINUX policy "Enforcing" causes the permission problem.CAUSE
You are encountering unpublished Bug 6140224, "SQLPLUS FAILS TO LOAD LIBNNZ11.SO WITH SELINUX ENABLED ON EL5/RHEL5". Oracle Developement is actively working on this compiler version compatibility issue (ICC compilers that are used for several libraries, such as LIBNNZ10.SO and LIBNNZ11.SO) in the RHEL 5 and OEL 5 environments.


This is fixed in the forthcoming version 11.2. No fix is available for the current versions. Please use the workaround presented below.
SOLUTION

Switch the SELinux from the default "Enforcing" mode that it is running in, to the "Permissive" mode.

Commands, as root:
======================
getenforce (returns "Enforcing")
setenforce 0
getenforce (returns "Permissive")

The commands for the workaround are immediate, and will remain in effect until the next reboot.
Please also ensure that SELinux "Permissive" enforcing is set at boot time by adding "enforcing=0" to the kernel boot line. An example of setting the SELinux mode to permissive from GRUB could be as follows:

title Red Hat Enterprise Linux ES (2.6.18-8.EL)
root (hd0,0)
kernel /vmlinuz-2.6.18-8.EL ro root=/dev/VolGroup00/LogVol00 rhgb quiet enforcing=0
initrd /initrd-2.6.18-8.EL.img
Another example as follows:

/etc/selinux/config

and add:
selinux=0
SELINUX=disabled

再次提醒,安装Oracle强烈建议关闭selinux

Q Q:107644445
Tel:13429648788
Email:dba@xifenfei.com
个人Blog(惜分飞)
提供专业ORACLE技术支持(数据恢复,安装实施,升级迁移,备份容灾,故障诊断,系统优化等)
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|Archiver|手机版|ORACLE SOS 技术论坛

GMT+8, 2024-12-5 10:15 , Processed in 0.029357 second(s), 21 queries .

Powered by Discuz! X3.4

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表