简体   繁体   English

导入错误:oracle 客户端库与 python wsgi

[英]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"当我部署时运行没有任何问题,但是当我尝试使用 apache wsgi 运行时出现此错误:DatabaseError: DPI-1047: 无法找到 64 位 Oracle 客户端库:“libclntsh.so:无法打开共享对象文件: 无此文件或目录”

Tried to use ldconfig and setup on environment LD_LIBRARY_PATH but didn't worked.尝试在环境 LD_LIBRARY_PATH 上使用 ldconfig 和 setup 但没有奏效。 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.服务器是带有 cx_oracle 7.2.0 和 django 1.11.22 的 linux x64,带有 python 2.7.15+ 并安装 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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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