Home > Database > Mysql Tutorial > body text

使用SRVCTL时报错:errorwhileloadingsharedlibraries

WBOY
Release: 2016-06-07 15:56:10
Original
1247 people have browsed it

1.报错如下: [oracle@rac1 ~]$ srvctl add service -d rac -s test -r rac1 /u01/app/oracle/product/dbhome_1/jdk/jre/bin/java: error while loading shared libraries: libpthread.so.0: cannot open shared object file: No such file or directory [or

1.报错如下:

[oracle@rac1 ~]$ srvctl add service -d rac -s test -r "rac1"

/u01/app/oracle/product/dbhome_1/jdk/jre/bin/java: error while loading shared libraries: libpthread.so.0: cannot open shared object file: No such file or directory
[oracle@rac1 ~]$ which srvctl --查看此命令,是在ORACLE_HOME下,正常应该是在CRS_HOME下。
/u01/app/oracle/product/dbhome_1/bin/srvctl

2.解决:修改环境变量,在PATH中将CRS_HOME放前面

[oracle@rac1 ~]$ vi .bash_profile

$ORA_CRS_HOME/bin:放到$ORACLE_HOME/bin:前面----原来是在后面
PATH=$ORA_CRS_HOME/bin:$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:$PATH:$HOME/bin:$ASM_HOME/bin


[oracle@rac1 ~]$ which srvctl
/u01/app/oracle/product/dbhome_1/bin/srvctl

[oracle@rac1 ~]$ source .bash_profile

[oracle@rac1 ~]$ which srvctl ---此时就是在CRS_HOME下找到的SRVCTL了。
/u01/app/oracle/product/crs/bin/srvctl
[oracle@rac1 ~]$ srvctl add service -d rac -s test -r "rac1" --可以正常使用。
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template