Error while loading shared libraries: libpthread.so.0 in Oracle Clusterware

Error while loading shared libraries: libpthread.so.0

During installation of VIPCA or Oracle clustware. Sometime we face the following error:
Error while loading shared libraries: libpthread.so.0

Example of Error as follows:

waiting for the Oracle CRSD and EVMD to start
Oracle CRS stack installed and running under init(1M)
Running vipca(silent) for configuring nodeapps
/u01/crs/oracle/product/10.2.0/crs/jdk/jre//bin/java: error while loading shared libraries: libpthread.so.0: cannot open shared object file: No such file or directory
At end of root.sh on the last node vipca will fail to run with the following error:
Oracle CRS stack installed and running under init(1M)
Running vipca(silent) for configuring nodeapps
/home/oracle/crs/oracle/product/10/crs/jdk/jre//bin/java: error while loading
shared libraries: libpthread.so.0: cannot open shared object file:
No such file or directory. Also, srvctl will show similar output if workaround below is not implemented.


Solution

Edit vipca (in the CRS bin directory on all nodes) to undo the setting of LD_ASSUME_KERNEL After the IF statement around line 123 add an unset command to ensure LD_ASSUME_KERNEL is not set as follows:

if [ "$arch" = "i686" -o "$arch" = "ia64" -o "$arch" = "x86_64" ]
then
LD_ASSUME_KERNEL=2.4.19
export LD_ASSUME_KERNEL
fi
unset LD_ASSUME_KERNEL         <<<== Line to be added


Note: Add the above line in file vipca 

Similar For SRVCTL utility:
Similarly for srvctl (in both the CRS and, when installed, RDBMS and ASM bin directories on all nodes), unset LD_ASSUME_KERNEL by adding one line, around line 168 should look like this:

LD_ASSUME_KERNEL=2.4.19
export LD_ASSUME_KERNEL

unset LD_ASSUME_KERNEL          <<<== Line to be added

Note: Remember to re-edit these files on all nodes at below location:
/bin/vipca
/bin/srvctl

Example of edit vipca file
During cluster setup might face the following error:

root@rac2 bin]# ./vipca
/u01/app/cluster/jdk/jre//bin/java: error while loading shared libraries: libpthread.so.0: cannot open shared object file: No such file or directory

Edit the vipca file
Note: put the line as unset LD_ASSUME_KERNEL shown in below example:

gedit vipca

(in the CRS bin directory on all nodes) to undo the setting of LD_ASSUME_KERNEL. After the IF statement around line 123 add an unset command to ensure LD_ASSUME_KERNEL is not set as follows:

if [ “$arch” = “i686” -o “$arch” = “ia64” -o “$arch” = “x86_64” ]
then
LD_ASSUME_KERNEL=2.4.19
export LD_ASSUME_KERNEL
fi
unset LD_ASSUME_KERNEL         <<<== Line to be added

For Reinstall the clusterware:
1. Shutdown Oracle clusterware on All Nodes.

crsctl stop crs

2. Execute rootdelete.sh from All Nodes.

$CRS_HOME/install/rootdelete.sh

3. Run rootdeinstall.sh from the Primary Node.

$CRS_HOME/install/rootdeinstall.sh

4. Restart the network service

#service network restart

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.