Oracle 11g R2 Installation Ubuntu-like Solving Errors 'install' & 'Agent nmhs' of Makefile

  1. Open a New Terminal Window
  2. Library Sim-Linking Needed at least for Ubuntu 12.10+ Based:
    sudo ln -fs /u01/app/oracle/product/11.2.0/dbhome_1/lib/stubs/libgcc_s.so.1 /lib64/libgcc_s.so.1

    Thanks to HannHha

  3. The Login as oracle User:
    su oracle
  4. Execute Step-by-Step (Copy & Paste into Terminal):
    sed -i 's/^(s*$(MK_EMAGENT_NMECTL))s*$/ -lnnz11/g' $ORACLE_HOME/sysman/lib/ins_emagent.mk
    sed -i 's/^($LD $LD_RUNTIME) ($LD_OPT)/ -Wl,--no-as-needed /g' $ORACLE_HOME/bin/genorasdksh
    sed -i 's/^(s*)($(OCRLIBS_DEFAULT))/ -Wl,--no-as-needed /g' $ORACLE_HOME/srvm/lib/env_srvm.mk
    sed -i 's/^(TNSLSNR_LINKLINE.*$(TNSLSNR_OFILES)) ($(LINKTTLIBS))/ -Wl,--no-as-needed /g' $ORACLE_HOME/network/lib/env_network.mk
    sed -i 's/^(ORACLE_LINKLINE.*$(ORACLE_LINKER)) ($(PL_FLAGS))/ -Wl,--no-as-needed /g' $ORACLE_HOME/rdbms/lib/env_rdbms.mk

    Then Verify the Changes Made!
    For the $ORACLE_HOME/sysman/lib/ins_emagent.mk File:

    nano $ORACLE_HOME/sysman/lib/ins_emagent.mk

    Use Ctrl+w for Searching on nano.
    Here Search for: “$(MK_EMAGENT_NMECTL)”
    Eventually append the Needed -lnnz11

    $(MK_EMAGENT_NMECTL) -lnnz11

    Ctrl+x to Save & Exit.
    Then Follow to Check/Amend the Files for the “-Wl,–no-as-needed” chunk insertion…
    For the $ORACLE_HOME/bin/genorasdksh File:

    nano $ORACLE_HOME/bin/genorasdksh

    Search for: “$LD $LD_RUNTIME”

    $LD $LD_RUNTIME -Wl,--no-as-needed $LD_OPT

    For $ORACLE_HOME/srvm/lib/env_srvm.mk File
    If you Not Find the OCRLIBS_DEFAULT there then Instead Modify the $ORACLE_HOME/srvm/lib/ins_srvm.mk (It depends from the Oracle 11g R2 DB Update Release!)

    nano $ORACLE_HOME/srvm/lib/env_srvm.mk

    Search for: “$(GETCRSHOME_OBJ1) $(OCRLIBS_DEFAULT)”

    GETCRSHOME_LINKLINE=$(LINK) $(LDPATHFLAG)$(RDBMSLIB) $(CDEBUG) $(OPT) $(GETCRSHOME_OBJ1) \
     -Wl,--no-as-needed $(OCRLIBS_DEFAULT) $(LLIBCLNTSH) $(LINKLDLIBS)

    For the $ORACLE_HOME/network/lib/env_network.mk File:

    nano $ORACLE_HOME/network/lib/env_network.mk

    Search for: “TNSLSNR_LINKLINE=$(LINK) $(TNSLSNR_OFILES)”

    TNSLSNR_LINKLINE=$(LINK) $(TNSLSNR_OFILES) -Wl,--no-as-needed $(LINKTTLIBS) $(LLIBONS)

    And Finally, for the $ORACLE_HOME/rdbms/lib/env_rdbms.mk File:

    nano $ORACLE_HOME/rdbms/lib/env_rdbms.mk

    Search for: “ORACLE_LINKER”

    ORACLE_LINKLINE=$(ORACLE_LINKER) -Wl,--no-as-needed $(PL_FLAGS) $(ORAMAI) $(SSORED) $(TTCSOI)
  5. Click on Retry on Error Message
  6. Eventually to Solve Issue ‘all_no_orcl’ Look:
    Troubleshooting Error in Invoking Target all_no_orcl of Makefile
  7. Warning: on Ubuntu 14.04/14.10/15.04 If Do Not Works Check Logs and If You Find a Notice About ‘libstdc++.so.5: undefined memcpy@GLIBC_2.14’ then Ignore and then Click on Continue to Follow Up and Achieve the Installation!