简体   繁体   English

cx_oracle无法找到Oracle客户端

[英]cx_oracle unable to find Oracle Client

I have installd Python 2.7.3 on Linux 64 bit machine. 我已经在Linux 64位计算机上安装了Python 2.7.3。 I have Oracle 11g client(64bit) as well installed. 我也安装了Oracle 11g客户端(64位)。 And I set ORACLE_HOME, PATH, LD_LIBRARY_PATH, and installed cx_oracle 5.1.2 version for Python 2.7 & Oracle 11g. 然后我设置了ORACLE_HOME,PATH,LD_LIBRARY_PATH,并为Python 2.7和Oracle 11g安装了cx_oracle 5.1.2版本。 But ldd command on cx_oracle is unable to find libclntsh.so.11.1. 但是cx_oracle上的ldd命令无法找到libclntsh.so.11.1。

I tried creating symlinks to libclntsh.so.11.1 under /usr/lib64, updated oracle.conf file under /etc/ld.so.conf.d/. 我尝试在/ usr / lib64下创建指向libclntsh.so.11.1的符号链接,在/etc/ld.so.conf.d/下更新了oracle.conf文件。 Tried all possible solutions that have been discussed on this issue on the forums, but no luck. 在论坛上尝试过讨论此问题的所有可能解决方案,但没有好运。 Please let me know what am missing. 请让我知道缺少的内容。

The issue with me was that I installed python, cx_oracle as root but Oracle client installation was done by "oracle" user. 我的问题是我以root用户身份安装了python,cx_oracle,但Oracle客户端安装是由“ oracle”用户完成的。 I got my own oracle installation and that fixed the issue. 我安装了自己的oracle,从而解决了该问题。

Later I ran into PyUnicodeUCS4_DecodeUTF16 issues with Python and for that I had to install python with —enable-unicode=ucs4 option 后来我遇到了PyUnicodeUCS4_DecodeUTF16与Python的问题,为此,我必须使用—enable-unicode = ucs4选项安装python

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

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