ins_emagent.mk错误

logs:

INFO: ----------------------------------
INFO: 

INFO: /home/oracle/app/oracle/product/11.2.0/sysman/lib/ins_emagent.mk:113: warning: overriding recipe for target 'nmosudo'
/home/oracle/app/oracle/product/11.2.0/sysman/lib/ins_emagent.mk:52: warning: ignoring old recipe for target 'nmosudo'

INFO: make -f /home/oracle/app/oracle/product/11.2.0/sysman/lib/ins_emagent.mk relink_exe EXENAME=nmo 

INFO: make[1]: Entering directory '/home/oracle/app/oracle/product/11.2.0/sysman/lib'

INFO: /home/oracle/app/oracle/product/11.2.0/sysman/lib/ins_emagent.mk:113: warning: overriding recipe for target 'nmosudo'
/home/oracle/app/oracle/product/11.2.0/sysman/lib/ins_emagent.mk:52: warning: ignoring old recipe for target 'nmosudo'

INFO: gcc -o /home/oracle/app/oracle/product/11.2.0/sysman/lib/nmo -L/home/oracle/app/oracle/product/11.2.0/lib/ -L/home/oracle/app/oracle/product/11.2.0/sysman/lib/ `cat /home/oracle/app/oracle/product/11.2.0/lib/sysliblist`  -lm `cat /home/oracle/app/oracle/product/11.2.0/lib/sysliblist` -ldl -lm -L/home/oracle/app/oracle/product/11.2.0/lib /home/oracle/app/oracle/product/11.2.0/sysman/lib/s0nmo.o /home/oracle/app/oracle/product/11.2.0/sysman/lib/libnmo.a -lcrypt -ldl    `cat /home/oracle/app/oracle/product/11.
INFO: 2.0/lib/sysliblist` -ldl -lm 

INFO: /usr/bin/ld: cannot find -lnsl

INFO: collect2: error: ld returned 1 exit status

INFO: make[1]: *** [/home/oracle/app/oracle/product/11.2.0/sysman/lib/ins_emagent.mk:92: /home/oracle/app/oracle/product/11.2.0/sysman/lib/nmo] Error 1

INFO: make[1]: Leaving directory '/home/oracle/app/oracle/product/11.2.0/sysman/lib'

INFO: make: *** [/home/oracle/app/oracle/product/11.2.0/sysman/lib/ins_emagent.mk:89: nmo] Error 2

INFO: End output from spawned process.
INFO: ----------------------------------

解决

打开/home/oracle/app/oracle/product/11.2.0/sysman/lib/ins_emagent.mk

找到如下内容后

$(SYSMANBIN)emdctl:
    $(MK_EMAGENT_NMECTL)

进行修改为如下

$(SYSMANBIN)emdctl:
    $(MK_EMAGENT_NMECTL) -lnnz11

再在root下执行

/home/oracle/app/oraInventory/orainstRoot.sh
/home/oracle/app/oracle/product/11.2.0/root.sh

如下

[root@oracle11g ~]# /home/oracle/app/oraInventory/orainstRoot.sh
Changing permissions of /home/oracle/app/oraInventory.
Adding read,write permissions for group.
Removing read,write,execute permissions for world.

Changing groupname of /home/oracle/app/oraInventory to oinstall.
The execution of the script is complete.
[root@oracle11g ~]# /home/oracle/app/oracle/product/11.2.0/root.sh
Check /home/oracle/app/oracle/product/11.2.0/install/root_oracle11g_2021-08-06_11-28-14.log for the output of root script

results matching ""

    No results matching ""