RAC srvctl 命令报 libpthread.so.0 cannot open shared object file No such file or directory 解决方法

运行srvctl 命令报错:

[oracle@rac1 u01]$ srvctl remove asm -n rac1

/u01/app/oracle/product/10.2.0/db_1/jdk/jre/bin/java: error while loading shared libraries: libpthread.so.0: cannot open shared object file: No such file or directory

开始还觉得奇怪,因为我在安装CRS的时候,已经修改了vipca ORA_CRS_HOMEsrvctl命令的中参数。 即注释掉了LD_ASSUME_KERNEL参数。

但是运行的时候,还是报了这个错误,后来用which srvctl命令才发现了问题的所在:

[oracle@rac1 u01]$ which srvctl

/u01/app/oracle/product/10.2.0/db_1/bin/srvctl

系统调用的是ORACLE_HOME下的srvctl。所以在修改LD_ASSUME_KERNEL命令时,别忘了修改ORACLE_HOME下的,如果变量是将ORACLE_HOME放在前面,那么就会调用ORACLE_HOME下的srvctl命令。

[oracle@rac2 bin]$ echo $PATH

.:.:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/usr/NX/bin:/home/oracle/bin:/home/oracle/bin:/u01/app/oracle/product/10.2.0/db_1/bin:/u01/app/oracle/product/crs/bin:/usr/bin:/bin:/usr/bin/X11:/usr/local/bin:/u01/app/oracle/common/oracle/bin:/home/oracle/bin:/home/oracle/bin:/u01/app/oracle/product/crs/bin:/u01/app/oracle/product/10.2.0/db_1/bin:/u01/app/oracle/product/crs/bin:/usr/bin:/bin:/usr/bin/X11:/usr/local/bin:/u01/app/oracle/common/oracle/bin

环境变量中的设置:

[oracle@rac2 ~]$ vi ~/.bash_profile

...

export PATH=.:${PATH}:$HOME/bin:$ORACLE_HOME/bin:$ORA_CRS_HOME/bin

...

修改一下环境变量中PATH的顺序:

export PATH=.:${PATH}:$HOME/bin:$ORA_CRS_HOME/bin:$ORACLE_HOME/bin

重新开了一个ssh窗口,因为在连接的时候才会加载profile文件,srvctl 的位置变成了ORA_CRS_HOME下面的了。

[oracle@rac2 ~]$ which srvctl

/u01/app/oracle/product/crs/bin/srvctl

注释的方法有两种:

1)使用unset

#Remove this workaround when the bug 3937317 is fixed

LD_ASSUME_KERNEL=2.4.19

export LD_ASSUME_KERNEL

unset LD_ASSUME_KERNEL

2)直接注释掉:

#Remove this workaround when the bug 3937317 is fixed

#LD_ASSUME_KERNEL=2.4.19

#export LD_ASSUME_KERNEL

---------------------------------------------------------------------------------------------------

Blog http://blog.csdn.net/tianlesoftware

网上资源: http://tianlesoftware.download.csdn.net

相关视频:http://blog.csdn.net/tianlesoftware/archive/2009/11/27/4886500.aspx

DBA1 群:62697716(); DBA2 群:62697977() DBA3 群:62697850()

DBA 超级群:63306533(); DBA4 群: 83829929 DBA5群: 142216823

聊天 群:40132017

--加群需要在备注说明Oracle表空间和数据文件的关系,否则拒绝申请

你可能感兴趣的:(Directory)