cx_Oracle找不到libclntsh.so.11.1错误

装完cx_Oracle之后,运行import cx_Oracle,报如下错误:

>>>import cx_Oracle

Traceback (most recent call last):

 File "",line 1, in

 ImportError: libclntsh.so.11.1: cannot open shared object file: No such file or directory


解决方案如下:

在/etc/profile中添加

LD_LIBRARY_PATH=$ORACLE_HOME/lib:/usr/lib:/usr/local/lib;
export LD_LIBRARY_PATH
然后可以用source /etc/profile 生效一下

你可能感兴趣的:(python)