解決Python 調(diào)用cx_Oracle時出現(xiàn)DPI-1047: 64-bit Oracle Client library cannot be loaded: "libclntsh.so
通常出現(xiàn)DPI-1047: 64-bit Oracle Client library cannot be loaded: "libclntsh.so: cannot open shared object file: No such file or directory的問題都是因為環(huán)境變量沒有配置正確柴信,如果你已經(jīng)下載了完整的 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