sqlplus libclntsh.so.19.1

业务用户执行sqlplus时报:

app$ sqlplus app/oracle@orcl
sqlplus: error while loading shared libraries: libclntsh.so.19.1: cannot open shared object file: No such file or directory

app用户ldd查看

app$ ldd `which sqlplus`
        linux-vdso.so.1 =>  (0x00007fff6afce000)
        libsqlplus.so => /u01/app/oracle/product/19.0.0/db_1/lib/libsqlplus.so (0x00007f6afc85d000)
        libclntsh.so.19.1 => not found
        libclntshcore.so.19.1 => /u01/app/oracle/product/19.0.0/db_1/lib/libclntshcore.so.19.1 (0x00007f6afc2bb000)
        libnnz19.so => /u01/app/oracle/product/19.0.0/db_1/lib/libnnz19.so (0x00007f6afbb73000)
        libdl.so.2 => /lib64/libdl.so.2 (0x00007f6afb96f000)
        libm.so.6 => /lib64/libm.so.6 (0x00007f6afb66d000)
        libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f6afb451000)
        libnsl.so.1 => /lib64/libnsl.so.1 (0x00007f6afb237000)
        librt.so.1 => /lib64/librt.so.1 (0x00007f6afb02f000)
        libaio.so.1 => /lib64/libaio.so.1 (0x00007f6afae2d000)
        libresolv.so.2 => /lib64/libresolv.so.2 (0x00007f6afac14000)
        libc.so.6 => /lib64/libc.so.6 (0x00007f6afa846000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f6afcb4a000)
        libclntsh.so.19.1 => not found

oracle用户ldd查看

oracle$ ldd `which sqlplus`
        linux-vdso.so.1 =>  (0x00007ffef8fd2000)
        libsqlplus.so => /u01/app/oracle/product/19.0.0/db_1/lib/libsqlplus.so (0x00007f33d12ec000)
        libclntsh.so.19.1 => /u01/app/oracle/product/19.0.0/db_1/lib/libclntsh.so.19.1 (0x00007f33cd1dc000)
        libclntshcore.so.19.1 => /u01/app/oracle/product/19.0.0/db_1/lib/libclntshcore.so.19.1 (0x00007f33ccc3a000)
        libnnz19.so => /u01/app/oracle/product/19.0.0/db_1/lib/libnnz19.so (0x00007f33cc4f2000)
        libdl.so.2 => /lib64/libdl.so.2 (0x00007f33cc2ee000)
        libm.so.6 => /lib64/libm.so.6 (0x00007f33cbfec000)
        libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f33cbdd0000)
        libnsl.so.1 => /lib64/libnsl.so.1 (0x00007f33cbbb6000)
        librt.so.1 => /lib64/librt.so.1 (0x00007f33cb9ae000)
        libaio.so.1 => /lib64/libaio.so.1 (0x00007f33cb7ac000)
        libresolv.so.2 => /lib64/libresolv.so.2 (0x00007f33cb593000)
        libc.so.6 => /lib64/libc.so.6 (0x00007f33cb1c5000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f33d15d9000)

文件并不少,权限问题:

#ll /u01/app/oracle/product/19.0.0/db_1/lib/libclntsh.so.19.1
-rw------- 1 oracle oinstall 81126040 2021-06-08 11:25:06 /u01/app/oracle/product/19.0.0/db_1/lib/libclntsh.so.19.1

#chmod 644 /u01/app/oracle/product/19.0.0/db_1/lib/libclntsh.so.19.1

权限大部分时间可能是selinux的问题

sqlplus libclntsh.so.19.1

上一篇:JDBC分页查询


下一篇:flink lookup join mysql demo