简体   繁体   中英

Import error: oracle client library with python wsgi

When I deployment don't get any problem to run, but when I trying run with apache wsgi got this error: DatabaseError: DPI-1047: Cannot locate a 64-bit Oracle Client library: "libclntsh.so: cannot open shared object file: No such file or directory"

Tried to use ldconfig and setup on environment LD_LIBRARY_PATH but didn't worked. The server is a linux x64 with cx_oracle 7.2.0 and django 1.11.22 with python 2.7.15+ and installing libaio.

root@webservice:/opt/instantclient_11_2# ls -la
lrwxrwxrwx 1 root root        17 Jul 10 15:41 libclntsh.so -> libclntsh.so.11.1
-rwxrwxr-x 1 root root  53865194 Aug 24  2013 libclntsh.so.11.1
-r-xr-xr-x 1 root root   7996693 Aug 24  2013 libnnz11.so
lrwxrwxrwx 1 root root        15 Jul 10 15:41 libocci.so -> libocci.so.11.1
-rwxrwxr-x 1 root root   1973074 Aug 24  2013 libocci.so.11.1
-rwxrwxr-x 1 root root 118738042 Aug 24  2013 libociei.so
-r-xr-xr-x 1 root root    164942 Aug 24  2013 libocijdbc11.so
-r--r--r-- 1 root root   2091135 Aug 24  2013 ojdbc5.jar
-r--r--r-- 1 root root   2739616 Aug 24  2013 ojdbc6.jar
-rwxrwxr-x 1 root root    192365 Aug 24  2013 uidrvci
-rw-rw-r-- 1 root root     66779 Aug 24  2013 xstreams.jarre


root@webservice:/opt/instantclient_11_2# cat /etc/ld.so.conf.d/oracle-instantclient.conf
/opt/instantclient_11_2

导出 LD_RUN_PATH:

export LD_RUN_PATH=$LD_LIBRARY_PATH

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM