Re: [cx-oracle-users] cx_Oracle-5.1.1 install help (Solaris 11 w/ Oracle DB Client 11.2.0.3 64-bit)
Brought to you by:
atuining
From: Christopher J. <chr...@or...> - 2012-02-15 18:24:35
|
Perhaps you copied my typo, thus resulting in LD_LIBRARY_PATH not set to the Instant Client directory. I get your error if I don't have LD_LIBRARY_PATH set. With it correctly set, cx_Oracle 5.1.1 is working fine for me with Python 2.6.4 on Solaris 11 x86 Chris On 02/15/2012 08:29 AM, Brad Hudson wrote: > Thanks for that Chris. I was able to build/install cx_Oracle after deinstalling the 64-bit client and installing the 32-bit client. However, there still appears to be an issue. It looks like cx_Oracle-5.1.1 is not setup for python2.6? > > # python > Python 2.6.4 (r264:75706, Oct 17 2011, 17:17:06) [C] on sunos5 > Type "help", "copyright", "credits" or "license" for more information. > >>> import cx_Oracle > Traceback (most recent call last): > File "<stdin>", line 1, in <module> > File "build/bdist.solaris-2.11-sun4v/egg/cx_Oracle.py", line 7, in <module> > File "build/bdist.solaris-2.11-sun4v/egg/cx_Oracle.py", line 6, in __bootstrap__ > ImportError: ld.so.1: isapython2.6: fatal: libclntsh.so.11.1: open failed: No such file or directory > >>> > > # ls -l /u01/app/oracle/product/11.2.0/client_1/lib/libclntsh.so > lrwxrwxrwx 1 oracle oinstall 61 Feb 15 08:53 /u01/app/oracle/product/11.2.0/client_1/lib/libclntsh.so -> /u01/app/oracle/product/11.2.0/client_1/lib/libclntsh.so.11.1 > # pwd > /usr/lib/python2.6/site-packages > [root@ilhsf001v010]# ls -l cx_Oracle-5.1.1-py2.6-solaris-2.11-sun4v.egg > -rw-r--r-- 1 root root 59402 Feb 15 09:09 cx_Oracle-5.1.1-py2.6-solaris-2.11-sun4v.egg > # cat easy-install.pth > import sys; sys.__plen = len(sys.path) > ./SQLAlchemy-0.7.5-py2.6.egg > ./cx_Oracle-5.1.1-py2.6-solaris-2.11-sun4v.egg > import sys; new=sys.path[sys.__plen:]; del sys.path[sys.__plen:]; p=getattr(sys,'__egginsert',0); sys.path[p:p]=new; sys.__egginsert = p+len(new) > # > > On Tue, Feb 14, 2012 at 6:35 PM, Christopher Jones <chr...@or... <mailto:chr...@or...>> wrote: > > > Try installing the 32bit Instant Client 'basic' & 'sdk' packages and > link cx_Oracle with it (by creating a symlink libclntsh.so -> > libclntsh.so.11.1 and setting ORACLE_HOME to the instant client > directory). > > Subsequently, prior to python runtime, set LD_LIBARY_PATH to the > Instant Client directory. ORACLE_HOME should not be set at runtime > since python is using Instant Client. It's only the cx_Oracle > installer that overloads the meaning of ORACLE_HOME. Connections will > need a connect string, such as "localhost/orcl". If you use a > tnsnames.ora file, then simply set TNS_ADMIN to its containing > directory. > > Chris > -- Email: chr...@or... Tel: +1 650 506 8630 Blog: http://blogs.oracle.com/opal/ |