collect2 ld returned 1 exit status

Introduction:-

Here will cover how to fix collect2 ld returned 1 exit status. Below error occurs during relink while applying the patch in oracle database. See how to Issue the failed relink command:

How resolve collect2 ld returned 1 exit status.

Error:- 

collect2: ld returned 1 exit status
make[1]: *** [/data02/1124home/sysman/lib/libnmemso.so] Error 1
make: *** [libnmemso] Error 2

Solution:-

To resolve the issue, execute the following steps:

Continue with the patch installation when you receive this error and complete it.

Search for file libjava.so on the server.

For example, you find it under the following directory

$ORACLE_HOME/jdk/jre/lib/i386 or you may use $ find $ORACLE_HOME -name “*libjava*” -exec ls -lart {} ;

In case of 64-bit Operation system amd64 instead of i386.

eg. $ORACLE_HOME/jdk/jre/lib/amd64

Backup and edit $ORACLE_HOME/sysman/lib/env_sysman.mk or

$ORACLE_HOME/sysman/lib/env_emagent.mk

Change: JRE_LIB_DIR=%JRE_HOME%/bin

To    : JRE_LIB_DIR=$(ORACLE_HOME)/jdk/jre/lib/i386   << In case of 64bit you may have to replace i386 with amd64

Issue the failed relink command:
 

% make -f ins_sysman.mk relink_sharedobj SHAREDOBJ=libnmemso

After follows the above steps hope your issue collect2 ld returned 1 exit status will resolve.


Useful Post: –


How to fix Import Standard Purchase Orders Error cannot read the file PO_PDOI_GRP.start_process issue.

1 thought on “collect2 ld returned 1 exit status”

Leave a Comment