报错集锦

1. cx_Oracle.DatabaseError: DPI-1047

cx_Oracle.DatabaseError: DPI-1047: Cannot locate a 64-bit Oracle Client library: “libnnz19.so: cannot open shared object file: No such file or directory”. See https://cx-oracle.readthedocs.io/en/latest/user_guide/installation.html for help

解决方案

设置环境变量,编辑.bashrc

  1. export ORACLE_NAME=/app/oracle/product/19c/client_1
  2. export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_NAME/lib

参考

  1. Welcome to cx_Oracle’s documentation! (cx-oracle.readthedocs.io)