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
참고
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 |