在本机装了一个测试的数据库,运行sysresv命令时报错:
[oracle@ttt dbs]$ which sysresv
/opt/ora10g/product/10.2.0/db_1/bin/sysresv
[oracle@ttt dbs]$ sysresv
sysresv: error while loading shared libraries: libclntsh.so.10.1: cannot open shared object file: No such file or directory
[oracle@ttt dbs]$
上网查了一下,找到一个,不是这个命令,但是错误一样。
http://dbua.iteye.com/blog/891010
把$ORACLE_HOME/lib加到文件/etc/ld.so.conf,重新ld,即可。
========== 下面是根据介绍,执行的步骤:
[oracle@TTT dbs]$ which sysresv
/opt/ora10g/product/10.2.0/db_1/bin/sysresv
[oracle@TTT dbs]$ sysresv
sysresv: error while loading shared libraries: libclntsh.so.10.1: cannot open shared object file: No such file or directory
[oracle@TTT dbs]$ cd $ORACLE_HOME/lib
[oracle@TTT lib]$ ls -l libclntsh.so.10.1
-rwxr-x--- 1 oracle oinstall 20706597 Sep 13 15:08 libclntsh.so.10.1
[oracle@TTT lib]$
[oracle@TTT lib]$ ldd `which sysresv`
libclntsh.so.10.1 => not found
libnnz10.so => not found
libdl.so.2 => /lib64/libdl.so.2 (0x0000003bd9a00000)
libm.so.6 => /lib64/libm.so.6 (0x0000003bd9600000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x0000003bd9e00000)
libnsl.so.1 => /lib64/libnsl.so.1 (0x0000003be2400000)
libc.so.6 => /lib64/libc.so.6 (0x0000003bd9200000)
/lib64/ld-linux-x86-64.so.2 (0x0000003bd8200000)
[oracle@TTT lib]$ pwd
/opt/ora10g/product/10.2.0/db_1/lib
[oracle@TTT lib]$ ls -l libnnz10.
libnnz10.a libnnz10.so
[oracle@TTT lib]$ ls -l libnnz10.so
-rw-r----- 1 oracle oinstall 3803097 Oct 20 2005 libnnz10.so
[oracle@TTT lib]$
[oracle@TTT lib]$
[oracle@TTT lib]$ cat /etc/ld.so.c
ld.so.cache ld.so.conf ld.so.conf.d/
[oracle@TTT lib]$ cat /etc/ld.so.conf
include ld.so.conf.d/*.conf
[oracle@TTT lib]$
[oracle@TTT lib]$ pwd
/opt/ora10g/product/10.2.0/db_1/lib
[oracle@TTT lib]$
[oracle@TTT lib]$ su -
Password:
[root@TTT ~]# vi /etc/ld.so.conf
[root@TTT ~]# ldconfig
ldconfig: File /opt/ora10g/product/10.2.0/db_1/lib/libnmadm.so is empty, not checked.
ldconfig: File /opt/ora10g/product/10.2.0/db_1/lib/libnmefsql.so is empty, not checked.
ldconfig: File /opt/ora10g/product/10.2.0/db_1/lib/libnmevq.so is empty, not checked.
ldconfig: File /opt/ora10g/product/10.2.0/db_1/lib/libordim10.soO is empty, not checked.
ldconfig: File /opt/ora10g/product/10.2.0/db_1/lib/libnmastk.so is empty, not checked.
ldconfig: File /opt/ora10g/product/10.2.0/db_1/lib/libnmasf.so.0 is empty, not checked.
ldconfig: File /opt/ora10g/product/10.2.0/db_1/lib/libnmuc.so is empty, not checked.
ldconfig: File /opt/ora10g/product/10.2.0/db_1/lib/libnmefvr.so is empty, not checked.
ldconfig: File /opt/ora10g/product/10.2.0/db_1/lib/libnmadbg.so.0 is empty, not checked.
ldconfig: File /opt/ora10g/product/10.2.0/db_1/lib/libnmevq.so.0 is empty, not checked.
ldconfig: File /opt/ora10g/product/10.2.0/db_1/lib/libnmuk.so.0 is empty, not checked.
ldconfig: File /opt/ora10g/product/10.2.0/db_1/lib/libnmemso.so is empty, not checked.
ldconfig: File /opt/ora10g/product/10.2.0/db_1/lib/libnmeoci.so.0 is empty, not checked.
ldconfig: File /opt/ora10g/product/10.2.0/db_1/lib/libnmefw.so.0 is empty, not checked.
ldconfig: File /opt/ora10g/product/10.2.0/db_1/lib/libnmuk.so is empty, not checked.
ldconfig: File /opt/ora10g/product/10.2.0/db_1/lib/libnmefud.so.0 is empty, not checked.
ldconfig: File /opt/ora10g/product/10.2.0/db_1/lib/libnmastk.so.0 is empty, not checked.
ldconfig: File /opt/ora10g/product/10.2.0/db_1/lib/libnmefud.so is empty, not checked.
ldconfig: File /opt/ora10g/product/10.2.0/db_1/lib/libnmefsql.so.0 is empty, not checked.
ldconfig: File /opt/ora10g/product/10.2.0/db_1/lib/libnmefos.so is empty, not checked.
ldconfig: File /opt/ora10g/product/10.2.0/db_1/lib/libnmefut.so.0 is empty, not checked.
ldconfig: File /opt/ora10g/product/10.2.0/db_1/lib/libnmefos.so.0 is empty, not checked.
ldconfig: File /opt/ora10g/product/10.2.0/db_1/lib/libnmefw.so is empty, not checked.
ldconfig: File /opt/ora10g/product/10.2.0/db_1/lib/libnmarl.so is empty, not checked.
ldconfig: File /opt/ora10g/product/10.2.0/db_1/lib/libnmalk.so is empty, not checked.
ldconfig: File /opt/ora10g/product/10.2.0/db_1/lib/libnmadbg.so is empty, not checked.
ldconfig: File /opt/ora10g/product/10.2.0/db_1/lib/libnmemso.so.0 is empty, not checked.
ldconfig: File /opt/ora10g/product/10.2.0/db_1/lib/libnmadm.so.0 is empty, not checked.
ldconfig: File /opt/ora10g/product/10.2.0/db_1/lib/libnmarl.so.0 is empty, not checked.
ldconfig: File /opt/ora10g/product/10.2.0/db_1/lib/libnmuc.so.0 is empty, not checked.
ldconfig: File /opt/ora10g/product/10.2.0/db_1/lib/libnmalk.so.0 is empty, not checked.
ldconfig: File /opt/ora10g/product/10.2.0/db_1/lib/libnmasf.so is empty, not checked.
ldconfig: File /opt/ora10g/product/10.2.0/db_1/lib/libnmeoci.so is empty, not checked.
ldconfig: File /opt/ora10g/product/10.2.0/db_1/lib/libnmefut.so is empty, not checked.
ldconfig: File /opt/ora10g/product/10.2.0/db_1/lib/libnmefvr.so.0 is empty, not checked.
ldconfig: /opt/ora10g/product/10.2.0/db_1/lib/libexpat.so.0 is not a symbolic link
[root@TTT ~]#
[root@TTT ~]# exit
logout
[oracle@TTT lib]$ sysresv
IPC Resources for ORACLE_SID "TESTDB" :
Shared Memory:
ID KEY
4784140 0x4b88b248
Semaphores:
ID KEY
524288 0x2868b4bc
Oracle Instance alive for sid "TESTDB"
[oracle@TTT lib]$
[oracle@TTT lib]$ cat /etc/ld.so.conf
include ld.so.conf.d/*.conf
/opt/ora10g/product/10.2.0/db_1/lib
[oracle@TTT lib]$