From: li wang on 19 Jul 2010 12:12 It's quite weird when I import cx_Oracle in python interactive shell, it works perfectly. but when I import cx_Oracle in a *,py script, handled by mod_python.publisher, it keep reportint : ImportError: libclntsh.so.10.1: cannot open shared object file: No such file or directory Can I anyone have a clue what's the matter, any help would be appreciated!
From: Mladen Gogala on 19 Jul 2010 14:08 On Mon, 19 Jul 2010 09:12:20 -0700, li wang wrote: > It's quite weird when I import cx_Oracle in python interactive shell, it > works perfectly. > but when I import cx_Oracle in a *,py script, handled by > mod_python.publisher, it keep reportint : > > ImportError: libclntsh.so.10.1: cannot open shared object file: No such > file or directory > > Can I anyone have a clue what's the matter, any help would be > appreciated! That's an Oracle error, it means that you didn't set and export LD_LIBRARY_PATH like this: export LD_LIBRARY_PATH=$ORACLE_HOME/lib This is how it normally works: mgogala(a)nycwxp2622:~$ python Python 2.6.4 (r264:75706, Dec 7 2009, 18:45:15) [GCC 4.4.1] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import cx_Oracle >>> And this is what happens when I unset the shell variable: mgogala(a)nycwxp2622:~$ unset LD_LIBRARY_PATH mgogala(a)nycwxp2622:~$ python Python 2.6.4 (r264:75706, Dec 7 2009, 18:45:15) [GCC 4.4.1] 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: libclntsh.so.11.1: cannot open shared object file: No such file or directory >>> My cx_Oracle is linked against Oracle instant client 11.2 on Ubuntu. -- http://mgogala.byethost5.com
|
Pages: 1 Prev: Email für Dich Next: ANNOUNCING Tahoe, the Least-Authority File System, v1.7.1 |