“libnnz19.so:无法打开共享对象文件:没有这样的文件或目录

"libnnz19.so: cannot open shared object file: No such file or directory

我已经在容器中安装了 cx_oracle(python3) 和即时客户端 21_1。当我第一次尝试时出现此错误

Cannot locate a 64-bit Oracle Client library: "/python- 
env/instantclient_21_1/lib/libclntsh.so:

所以我在 /python-env/instantclient_21_1/ 下创建了库并再次尝试,现在我收到这个错误

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

我不明白它在哪里搜索so文件。它已经存在于 /python- env/instantclient_21_1/lib/

请帮忙

按照 Instant Client installation steps or cx_Oracle Installation steps 并使用 ldconfig 设置库路径以包含 Instant Client 目录。

您可以设置 DPI_DEBUG_LEVEL=64(参见 here)来跟踪 cx_Oracle 如何查找库。

另见 Docker for Oracle Database Applications in Node.js and Python