OS환경 : Oracle Cloud Linux (64bit)
DB 환경 : Oracle Cloud ATP Database 18.4.0.0
에러 : sqlplus: error while loading shared libraries: libclntsh.so.18.1: cannot open shared object file: No such file or directory
instant client(sqlplus 포함)에서 타db 접속시도 시 아래 오류 발생
1 2 3 | $ sqlplus 유저명/패스워드@atpdb_high sqlplus: error while loading shared libraries: libclntsh.so.18.1: cannot open shared object file: No such file or directory |
또는
1 2 3 4 5 | $ sqlplus 유저명/패스워드@atpdb_high Error 6 initializing SQL*Plus SP2-0667: Message file sp1<lang>.msb not found SP2-0750: You may need to set ORACLE_HOME to your Oracle software directory |
해결 방법 : basic instant cilent 파일도 같은 위치에 압축을 풀고 LD_LIBRARY_PATH 적용한다.
처음 다운로드 받은 instant client
1 2 | SQL*Plus Package - The SQL*Plus command line tool for SQL and PL/SQL queries Download instantclient-sqlplus-linux.x64-18.3.0.0.0dbru.zip (915,778 bytes) (cksum - 2810474334) |
추가로 다운로드 받을 instant client
1 2 | Basic Package - All files required to run OCI, OCCI, and JDBC-OCI applications Download instantclient-basic-linux.x64-18.3.0.0.0dbru.zip (72,794,506 bytes) (cksum - 3435694482) |
아래 링크로 가서 oracle instant client basic 다운로드
https://www.google.com/search?q=oracle+instant+client
다운 받은 뒤 같은 경로에 압축 해제
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | $ unzip instantclient-basic-linux.x64-18.3.0.0.0dbru.zip Archive: instantclient-basic-linux.x64-18.3.0.0.0dbru.zip inflating: instantclient_18_3/adrci inflating: instantclient_18_3/BASIC_README inflating: instantclient_18_3/genezi inflating: instantclient_18_3/libclntshcore.so.18.1 linking: instantclient_18_3/libclntsh.so -> libclntsh.so.18.1 inflating: instantclient_18_3/libclntsh.so.18.1 inflating: instantclient_18_3/libipc1.so inflating: instantclient_18_3/libmql1.so inflating: instantclient_18_3/libnnz18.so linking: instantclient_18_3/libocci.so -> libocci.so.18.1 inflating: instantclient_18_3/libocci.so.18.1 inflating: instantclient_18_3/libociei.so inflating: instantclient_18_3/libocijdbc18.so inflating: instantclient_18_3/libons.so inflating: instantclient_18_3/liboramysql18.so creating: instantclient_18_3/network/ inflating: instantclient_18_3/ojdbc8.jar inflating: instantclient_18_3/ucp.jar inflating: instantclient_18_3/uidrvci inflating: instantclient_18_3/xstreams.jar creating: instantclient_18_3/network/admin/ inflating: instantclient_18_3/network/admin/README finishing deferred symbolic links: instantclient_18_3/libclntsh.so -> libclntsh.so.18.1 instantclient_18_3/libocci.so -> libocci.so.18.1 |
ORACLE_HOME과 LD_LIBRARY_PATH 적용
1 2 3 4 | export TNS_ADMIN=클라이언트 설치 경로 export ORACLE_HOME=클라이언트 설치 경로 export LD_LIBRARY_PATH=$ORACLE_HOME export PATH=$ORACLE_HOME:/bin:/usr/bin |
다시 접속
잘 들어가지는것을 확인할 수 있다.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | $ sqlplus 유저명/패스워드@atpdb_high SQL*Plus: Release 18.0.0.0.0 - Production on Wed Jan 16 14:16:19 2019 Version 18.3.0.0.0 Copyright (c) 1982, 2018, Oracle. All rights reserved. Last Successful login time: Mon Jan 14 2019 15:24:49 +09:00 Connected to: Oracle Database 18c Enterprise Edition Release 18.0.0.0.0 - Production Version 18.4.0.0.0 SQL> select instance_name, version, status from v$instance; INSTANCE_NAME VERSION STATUS ---------------- ----------------- ------------ e7e1pod1 18.0.0.0.0 OPEN |
원인 : [sqlplus 포함 instant client 파일]만 있고 [basic instant client 파일]이 없어서 발생
에러에서도 나와있듯이 libclntsh.so.18.1 파일을 찾지 못하는 경우이다.
sqlplus 포함 instant client에는 해당 파일이 없고 basic instant client에 해당 파일이 있어서 함께 넣어준 것
1 | libclntsh.so.18.1: cannot open shared object file: No such file or directory |
이에러는 LD_LIBRARY_PATH, PATH가 잡혀있지 않아서 발생하는 오류이다.
1 2 | SP2-0667: Message file sp1<lang>.msb not found SP2-0750: You may need to set ORACLE_HOME to your Oracle software directory |
참조 :
'ORACLE > Trouble Shooting' 카테고리의 다른 글
ORA-28759: failure to open file (0) | 2019.01.16 |
---|---|
ORA-28864: SSL connection closed gracefully (0) | 2019.01.16 |
2019년 1월 Oracle 중요 패치 업데이트 | Oracle Critical Patch Update for January 2019 (0) | 2019.01.16 |
ORA-01336: specified dictionary file cannot be opened (0) | 2019.01.15 |
ORA-00600: internal error code, arguments: [ktfbns_update_ilmstat2] (0) | 2019.01.14 |