[DB-SIG] cx_Oracle Oracle 10g on Linux

Andy Todd andy47 at halfcooked.com
Mon May 3 14:32:32 EDT 2004


Anthony Baxter wrote:
> Andy Todd wrote:
> 
>> Hi all,
>>
>> I've just installed Oracle 10g on my Debian box and am now trying to 
>> talk to it from Python.
>>
>> I've downloaded and installed cx_Oracle 4.0.1 but when I try and 
>> import the module I get an error;
>>
>> """
>> Python 2.3.3 (#2, Feb 24 2004, 09:29:20)
>> [GCC 3.3.3 (Debian)] on linux2
>> Type "help", "copyright", "credits" or "license" for more information.
>>  >>> import cx_Oracle
>> Traceback (most recent call last):
>>   File "<stdin>", line 1, in ?
>> ImportError: libclntsh.so.10.1: cannot open shared object file: No 
>> such file or directory
>>  >>>
>> """
>>
>> For the record, Oracle 10g does have a libclntsh.so (in $ORACLE_HOME/lib)
>>
>> I note that Anthony says that the code works on Linux 
>> (http://aspn.activestate.com/ASPN/Mail/Message/db-sig/2011613) so I'm 
>> presuming I am missing some configuration. Does anyone have any 
>> suggestions?
> 
> 
> Is your Oracle environment set up correctly? Do you have $ORACLE_HOME,
> and is $ORACLE_HOME/lib in your ld.so search path?

That was indeed the problem. As I said in my last message I had to 
define LD_LIBRARY_PATH and make sure it contained $ORACLE_HOME/lib

Regards,
Andy

-- 
--------------------------------------------------------------------------------
 From the desk of Andrew J Todd esq - http://www.halfcooked.com/



More information about the DB-SIG mailing list