我正在尝试在 linux RHEL x86_64 中的 Apache WS 中运行 python。
在安装和配置 Python2.5 和 Apache 之后,我将 Oracle Instant Client(基本和 sdk)安装在一个 .rpm 文件中,没有任何问题。
oracle-instantclient-basic-10.2.0.4-1.x86_64.rpm
oracle-instantclient-devel-10.2.0.4-1.x86_64.rpm
我设置了环境变量
export ORACLE_HOME=/appl/paths/instantclient_10_2
export LD_LIBRARY_PATH=$ORACLE_HOME/lib
export PATH=$ORACLE_HOME/bin:$PATH
然后通过 .rpm 文件安装 cx_Oracle 也没有任何问题。
cx_Oracle-5.0.3-10g-unicode-py25-1.x86_64.rpm
当我尝试在 python 中导入 cx_Oracle 时,我收到了消息
Python 2.5.2 (r252:60911, Jul 1 2010, 17:47:36)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-46)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import cx_Oracle
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: /appl/paths/python2.5/site-packages/cx_Oracle.so: undefined symbol: OCIDBShutdown
我用谷歌搜索没有成功的答案。任何提示?