[오라클/파이썬] DPI-1047오류 해결방법(oracledb)

2022. 10. 12. 18:38·개발/Python
728x90

환경 Ubuntu 20.04.4 LTS

해당글은 "cx_Oracle error. DPI-1047: Cannot locate a 64-bit Oracle Client library" 오류가 아닙니다.

"oracledb.exceptions.DatabaseError: DPI-1047:" 오류 입니다. 하지만 해결 방법은 같습니다.

발생 오류

oracledb.exceptions.DatabaseError: DPI-1047: Cannot locate a 64-bit Oracle Client library: "libclntsh.so: cannot open shared object file: No such file or directory". See https://oracledb.readthedocs.io/en/latest/user_guide/installation.html for help
oracledb.exceptions.DatabaseError: DPI-1047: Cannot locate a 64-bit Oracle Client library: "libnnz21.so: cannot open shared object file: No such file or directory". See https://oracledb.readthedocs.io/en/latest/user_guide/installation.html for help

 

해결방법

1) 환경에 맞는  클라이언트 다운로드 (저는 wget을 사용하기 위해, 링크복사를 했습니다.) https://www.oracle.com/kr/database/technologies/instant-client/downloads.html

2) 오라클 폴더 생성 및 환경설정

sudo mkdir -p /opt/oracle
cd /opt/oracle/

wget https://download.oracle.com/otn_software/linux/instantclient/217000/instantclient-basic-linux.x64-21.7.0.0.0dbru.zip
unzip instantclient-basic-linux.x64-21.7.0.0.0dbru.zip

sudo apt-get install -y libaio1

sudo sh -c "echo /opt/oracle/instantclient_21_7 > /etc/ld.so.conf.d/oracle-instantclient.conf"
sudo ldconfig

 

참고

https://cx-oracle.readthedocs.io/en/latest/user_guide/installation.html#oracle-instant-client-zip-files

728x90
저작자표시 비영리 변경금지 (새창열림)

'개발 > Python' 카테고리의 다른 글

[Python] 고프로(Gopro) 연결하기 (+웹캠(스트리밍))  (0) 2023.07.25
[python/linux] 파이썬 nohup 사용법(백그라운드,데몬실행)  (0) 2022.12.09
[Python] pip install 오류('cp949' codec can't decode byte 0xe2 in position 1091: illegal multibyte sequence)  (0) 2022.04.04
[Linux/Ubuntu] Ubuntu 20.04에 python3.7 설치  (0) 2021.01.27
[python] ImageAI 사용해서 image Object Detection(1)  (0) 2021.01.22
'개발/Python' 카테고리의 다른 글
  • [Python] 고프로(Gopro) 연결하기 (+웹캠(스트리밍))
  • [python/linux] 파이썬 nohup 사용법(백그라운드,데몬실행)
  • [Python] pip install 오류('cp949' codec can't decode byte 0xe2 in position 1091: illegal multibyte sequence)
  • [Linux/Ubuntu] Ubuntu 20.04에 python3.7 설치
호이호이209
호이호이209
이것저것 기록하는 메모장
    250x250
  • 호이호이209
    R=VD
    호이호이209
    • R=VD전체글 (83)
      • 개발 (63)
        • Linux (19)
        • 머신러닝 (10)
        • Git (6)
        • Python (9)
        • 프로그래밍 언어 (2)
        • Docker (5)
        • ETC (12)
      • 일상기록 (20)
        • 여행 (5)
        • 일상-이모저모 (8)
  • 인기 글

  • 최근 글

  • hELLO· Designed By정상우.v4.10.3
호이호이209
[오라클/파이썬] DPI-1047오류 해결방법(oracledb)
상단으로

티스토리툴바