Linux7安装Oracle 11g 86%报错:Error in invoking target 'agent nmhs' of makefile

时间:2021-09-10 07:49:07

报错环境

OS:Oracle Linux 7、Redhat 7、CentOS7
DB:Oracle 11.2.0.4

报错标志

安装到86%时出现报错 Error in invoking target ‘agent nmhs’ of makefile
Linux7安装Oracle 11g 86%报错:Error in invoking target 'agent nmhs' of makefile
安装日志里面报错信息如下:

usr/bin/ld: /u01/app/oracle/product/11.2.0/dbhome_1/sysman/lib//libnmectl.a(nmectlt.o): undefined reference to symbol ‘B_DestroyKeyObject’
/usr/bin/ld: note: ‘B_DestroyKeyObject’ is defined in DSO /u01/app/oracle/product/11.2.0/dbhome_1/lib/libnnz11.so so try adding it to the linker command line
/u01/app/oracle/product/11.2.0/dbhome_1/lib/libnnz11.so: could not read symbols: Invalid operation
collect2: error: ld returne
INFO: d 1 exit status

官方解释

Unpublished bug 19692824
During installation of Oracle Database or Oracle RAC on OL7, the following linking error may be encountered:

Error in invoking target 'agent nmhs' of makefile '<ORACLE_HOME>/sysman/lib/ins_emagent.mk'. See '<installation log>' for details.

If this error is encountered, the user should select Continue. Then, after the installation has completed, the user must download Patch 19692824 from My Oracle Support and apply it per the instructions included in the patch README.
官方的解释说是先继续安装,然后再打补丁,这个bug19692824是在创建数据库的时候引发的。如果你在安装数据库软件的时候就报错,建议使用下面的解决方法。

建议的解决方案

在makefile中添加链接libnnz11库的参数
修改$ORACLE_HOME/sysman/lib/ins_emagent.mk,找到下面这行

$(MK_EMAGENT_NMECTL)

修改为:

$(MK_EMAGENT_NMECTL) -lnnz11

建议修改前备份原始文件

cd $ORACLE_HOME/sysman/lib
cp ins_emagent.mk ins_emagent.mk.bak
vi ins_emagent.mk

进入vi编辑器后 命令模式输入/NMECTL 进行查找,快速定位要修改的行。
在后面追加参数-lnnz11, 第一个是字母l,后面两个是数字1。
保存退出后Retry。

后语

Oracle11g的其他版本可能也会有这个报错,也可以参照解决,但是不推荐在未经过Oracle认证过的系统上安装相应版本。
Oracle Database 11.2.0.4.0 已在 Linux x86-64 Red Hat Enterprise Linux 7 上通过认证
Linux7安装Oracle 11g 86%报错:Error in invoking target 'agent nmhs' of makefile
Oracle Database 11.2.0.3.0 未在 Linux x86-64 Red Hat Enterprise Linux 7 上通过认证
Linux7安装Oracle 11g 86%报错:Error in invoking target 'agent nmhs' of makefile
参考文档(MOS):
Installation of Oracle 11.2.0.4 Database Software on OL7 fails with “undefined reference to symbol ‘B_DestroyKeyObject’” error (文档 ID 1965691.1)