执行srvctl报错 :error while loading shared libraries: libpthread.so.0:

来源:互联网 发布:iphone网络锁怎么解除 编辑:程序博客网 时间:2024/06/05 08:49
  执行srvctl是报错  error while loading shared libraries: libpthread.so.0: [oracle@rac02 ~]$ srvctl /opt/ora10g/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查看srvctl命令,正确的应该在?/crs/bin目录下,而本机的却在db_1/bin目录下[oracle@rac02 ~]$ which  srvctl/opt/ora10g/product/10.2.0/db_1/bin/srvctl查看变量设置[oracle@rac02 ~]$ more .bash_profile # .bash_profile# Get the aliases and functionsif [ -f ~/.bashrc ]; then        . ~/.bashrcfi# User specific environment and startup programsPATH=$PATH:$HOME/binexport PATHexport TMP=/tmpexport TMPDIR=$TMPexport ORACLE_BASE=/opt/ora10gexport ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1export ORACLE_SID=RACDB1export ORACLE_TERM=xtermexport PATH=/usr/sbin:$PATHexport PATH=$ORACLE_HOME/bin:$PATHexport LD_LIBRARY_PATH=$ORACLE_HOME/bin:/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin/export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlibulimit -u 16384 -n 65536umask 022这列export PATH=$ORACLE_HOME/bin:$PATH 没有crs_home所以才会找到$ORACLE_HOME/bin下的srvctl $vi /home/oracle/.bash_profile 增加以下信息 export CRS_HOME=$ORACLE_BASE/product/10.2.0/crs 修改 export PATH=$ORACLE_HOME/bin:$PATH 为 export PATH=$CRS_HOME/bin:$ORACLE_HOME/bin:$PATH[oracle@rac02 ~]$ source  .bash_profile [oracle@rac02 ~]$ which  srvctl/opt/ora10g/product/10.2.0/crs/bin/srvctl找到了正确的srvctl命令$vi /opt/ora10g/product/10.2.0/crs/bin/vipca注释掉  LD_ASSUME_KERNEL=2.4.19  export LD_ASSUME_KERNEL  如下即可#Remove this workaround when the bug 3937317 is fixed       arch=`uname -m` if [ "$arch" = "i686" -o "$arch" = "ia64" -o "$arch" = "x86_64" ]    then      # LD_ASSUME_KERNEL=2.4.19      # export LD_ASSUME_KERNEL[oracle@rac02 bin]$ srvctl 用法: srvctl <command> <object> [<options>]    命令: enable|disable|start|stop|relocate|status|add|remove|modify|getenv|setenv|unsetenv|config    对象: database|instance|service|nodeapps|asm|listener有关各个命令和对象的详细帮助, 请使用:    srvctl <command> <object> -h执行srvctl 查看OCR注册的数据库信息[oracle@rac02 ~]$ srvctl   config  databaseRACDB说明 在OCR中注册了一个数据库 即RACDB

原创粉丝点击