解决Python 调用cx_Oracle时出现DPI-1047: 64-bit Oracle Client library cannot be loaded: "libclntsh.so
通常出现DPI-1047: 64-bit Oracle Client library cannot be loaded: "libclntsh.so: cannot open shared object file: No such file or directory的问题都是因为环境变量没有配置正确,如果你已经下载了完整的 Oracle instantclient,并安装了cx_Oracle 库,只要在 /etc/ld.so.conf.d/oracle-instantclient.conf中加入正确的instantclient路径并ldconfig 即可。
sudo vim /etc/ld.so.conf.d/oracle-instantclient.conf
sudo ldconfig