Thread: [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: Brad H. <bra...@gm...> - 2012-02-14 15:54:46
|
Can anyone assist with an install of cx_Oracle-5.1.1 on Solaris 11? I have installed the Oracle DB Client 11.2.0.3 (64-bit on SPARC) and receive the following error when attempting to build cx_Oracle: # python setup.py build running build running build_ext building 'cx_Oracle' extension /usr/lib/python2.6/pycc -G build/temp.solaris-2.11-sun4v-2.6-11g/cx_Oracle.o -L/u01/app/oracle/product/11.2.0/client_1/lib -L. -lclntsh -lpython2.6 -o build/lib.solaris-2.11-sun4v-2.6-11g/cx_Oracle.so ld: fatal: file /u01/app/oracle/product/11.2.0/client_1/lib/libclntsh.so: wrong ELF class: ELFCLASS64 ld: fatal: file processing errors. No output written to build/lib.solaris-2.11-sun4v-2.6-11g/cx_Oracle.so collect2: ld returned 1 exit status error: command '/usr/lib/python2.6/pycc' failed with exit status 1 # |
From: Anthony T. <ant...@gm...> - 2012-02-14 16:09:25
|
Hi, Looks to me like you are trying to use a 64-bit Oracle client with a 32-bit Python. That won't work. :-) You will need to have a 64-bit Python. If you already do, the other possibility is that you need a special switch to specify that you want to build 64-bit binaries. If that is the case, let me know what needs to be adjusted in setup.py to make things work for you. Thanks. Anthony On Tue, Feb 14, 2012 at 8:54 AM, Brad Hudson <bra...@gm...> wrote: > Can anyone assist with an install of cx_Oracle-5.1.1 on Solaris 11? I have > installed the Oracle DB Client 11.2.0.3 (64-bit on SPARC) and receive the > following error when attempting to build cx_Oracle: > > # python setup.py build > running build > running build_ext > building 'cx_Oracle' extension > /usr/lib/python2.6/pycc -G build/temp.solaris-2.11-sun4v-2.6-11g/cx_Oracle.o > -L/u01/app/oracle/product/11.2.0/client_1/lib -L. -lclntsh -lpython2.6 -o > build/lib.solaris-2.11-sun4v-2.6-11g/cx_Oracle.so > ld: fatal: file /u01/app/oracle/product/11.2.0/client_1/lib/libclntsh.so: > wrong ELF class: ELFCLASS64 > ld: fatal: file processing errors. No output written to > build/lib.solaris-2.11-sun4v-2.6-11g/cx_Oracle.so > collect2: ld returned 1 exit status > error: command '/usr/lib/python2.6/pycc' failed with exit status 1 > # > > ------------------------------------------------------------------------------ > Keep Your Developer Skills Current with LearnDevNow! > The most comprehensive online learning library for Microsoft developers > is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, > Metro Style Apps, more. Free future releases when you subscribe now! > http://p.sf.net/sfu/learndevnow-d2d > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > |
From: Christopher J. <chr...@or...> - 2012-02-15 00:36:02
|
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 On 02/14/2012 08:09 AM, Anthony Tuininga wrote: > Hi, > > Looks to me like you are trying to use a 64-bit Oracle client with a > 32-bit Python. That won't work. :-) You will need to have a 64-bit > Python. If you already do, the other possibility is that you need a > special switch to specify that you want to build 64-bit binaries. If > that is the case, let me know what needs to be adjusted in setup.py to > make things work for you. Thanks. > > Anthony > > On Tue, Feb 14, 2012 at 8:54 AM, Brad Hudson<bra...@gm...> wrote: >> Can anyone assist with an install of cx_Oracle-5.1.1 on Solaris 11? I have >> installed the Oracle DB Client 11.2.0.3 (64-bit on SPARC) and receive the >> following error when attempting to build cx_Oracle: >> >> # python setup.py build >> running build >> running build_ext >> building 'cx_Oracle' extension >> /usr/lib/python2.6/pycc -G build/temp.solaris-2.11-sun4v-2.6-11g/cx_Oracle.o >> -L/u01/app/oracle/product/11.2.0/client_1/lib -L. -lclntsh -lpython2.6 -o >> build/lib.solaris-2.11-sun4v-2.6-11g/cx_Oracle.so >> ld: fatal: file /u01/app/oracle/product/11.2.0/client_1/lib/libclntsh.so: >> wrong ELF class: ELFCLASS64 >> ld: fatal: file processing errors. No output written to >> build/lib.solaris-2.11-sun4v-2.6-11g/cx_Oracle.so >> collect2: ld returned 1 exit status >> error: command '/usr/lib/python2.6/pycc' failed with exit status 1 >> # >> >> ------------------------------------------------------------------------------ >> Keep Your Developer Skills Current with LearnDevNow! >> The most comprehensive online learning library for Microsoft developers >> is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, >> Metro Style Apps, more. Free future releases when you subscribe now! >> http://p.sf.net/sfu/learndevnow-d2d >> _______________________________________________ >> cx-oracle-users mailing list >> cx-...@li... >> https://lists.sourceforge.net/lists/listinfo/cx-oracle-users >> > > ------------------------------------------------------------------------------ > Keep Your Developer Skills Current with LearnDevNow! > The most comprehensive online learning library for Microsoft developers > is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, > Metro Style Apps, more. Free future releases when you subscribe now! > http://p.sf.net/sfu/learndevnow-d2d > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users -- Email: chr...@or... Tel: +1 650 506 8630 Blog: http://blogs.oracle.com/opal/ |
From: Brad H. <bra...@gm...> - 2012-02-15 16:29:57
|
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...> 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 > > |
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/ |
From: Brad H. <bra...@gm...> - 2012-02-15 19:26:58
|
Thanks again Chris. I did miss setting the LD_LIBRARY_PATH variable to the client lib directory. It imports successfully now. On Wed, Feb 15, 2012 at 12:24 PM, Christopher Jones < chr...@or...> wrote: > > 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 |