Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Can't Find libclntsh.so.11.1 With Oracle Backend
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  6 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Jon Blake  
View profile  
 More options Sep 10 2012, 12:41 am
From: Jon Blake <jc.bla...@gmail.com>
Date: Sun, 9 Sep 2012 21:41:00 -0700 (PDT)
Subject: Can't Find libclntsh.so.11.1 With Oracle Backend

I have worked through the Django tutorial parts 1 and 2 with an Oracle back
end using the development server. Everything worked fine. I now want to use
a real server - Apache + mod_wsgi. I've got to the point where I get an
"Improperly Configured at /" page, which shows the following:

Exception Type:     ImproperlyConfigured

> Exception Value:     Error loading cx_Oracle module: libclntsh.so.11.1:
> cannot open shared object file: No such file or directory
> Exception Location:    
> /usr/lib/python2.7/site-packages/django/db/backends/oracle/base.py in
> <module>, line 46

Line 46 raises exception ImproperlyConfigured on a try block which imports
cx_Oracle.

cx_Oracle is properly installed. In my desktop environment:

$ python

> >>> import cx_Oracle

works fine. I also export LD_LIBRARY_PATH which points to where
libclntsh.so.11.1 resides. If I clear this environment
variable, import cx_Oracle fails with:

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

> file or directory

It looks like I have to tell my app what my path to libclntsh.so.11.1 is. I
have added:

os.environ['LD_LIBRARY_PATH'] = '/oracle/product/11.1.0/db_1/lib'


to my app's wsgi.py file, but this does resolve my problem.

Can anyone assist with how to progress this?

Environment:
  O/S:     Fedora14
  Apache: 2.2.17
  Python: 2.7
  mod_wsgi: 3.2
  cx_Oracle: 5.1
  Django: 1.4.1


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jon Blake  
View profile  
 More options Sep 10 2012, 1:52 am
From: Jon Blake <jc.bla...@gmail.com>
Date: Sun, 9 Sep 2012 22:52:09 -0700 (PDT)
Local: Mon, Sep 10 2012 1:52 am
Subject: Re: Can't Find libclntsh.so.11.1 With Oracle Backend

Just an edit to my original post: ... but this does *not* resolve my
problem. Sorry for any confusion.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ian  
View profile  
 More options Sep 10 2012, 12:11 pm
From: Ian <ian.g.ke...@gmail.com>
Date: Mon, 10 Sep 2012 09:11:06 -0700 (PDT)
Local: Mon, Sep 10 2012 12:11 pm
Subject: Re: Can't Find libclntsh.so.11.1 With Oracle Backend

On Sunday, September 9, 2012 10:41:00 PM UTC-6, Jon Blake wrote:

> It looks like I have to tell my app what my path to libclntsh.so.11.1 is.
> I have added:

> os.environ['LD_LIBRARY_PATH'] = '/oracle/product/11.1.0/db_1/lib'

> to my app's wsgi.py file, but this does resolve my problem.

LD_LIBRARY_PATH has to be set before the process starts to be honored.  So
it's not sufficient to set it in the wsgi file with os.environ; you need to
use an Apache SetEnv directive, or use a script to export it in the Apache
process's environment variables when Apache is started.  Or as a third
option, use ldconfig to make the Oracle library path globally visible.

Cheers,
Ian


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jani Tiainen  
View profile  
 More options Sep 10 2012, 4:15 pm
From: Jani Tiainen <rede...@gmail.com>
Date: Mon, 10 Sep 2012 23:15:31 +0300
Local: Mon, Sep 10 2012 4:15 pm
Subject: Re: Can't Find libclntsh.so.11.1 With Oracle Backend

I've been using ldconfig to handle libs. It's easy as runnig following few
commands as a root. (Though I always use oracle instantclient, it's just
simpler in many cases):

$ echo  /oracle/product/11.1.0/db_1/**lib  > /etc/ld.so.conf.d/oracle.conf
$ ldconfig

--
Jani Tiainen

- Well planned is half done, and a half done has been sufficient before...


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jon Blake  
View profile  
 More options Sep 10 2012, 7:05 pm
From: Jon Blake <jc.bla...@gmail.com>
Date: Mon, 10 Sep 2012 16:05:16 -0700 (PDT)
Local: Mon, Sep 10 2012 7:05 pm
Subject: Re: Can't Find libclntsh.so.11.1 With Oracle Backend

Thanks, Jani and Ian. I've used the ldconfig approach to fix this problem.
Now getting a "ImportError at /" page, for which I'll post another question.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Иван Земцов  
View profile  
 More options Sep 11 2012, 2:33 am
From: Иван Земцов <inze...@gmail.com>
Date: Tue, 11 Sep 2012 10:33:23 +0400
Local: Tues, Sep 11 2012 2:33 am
Subject: Re: Can't Find libclntsh.so.11.1 With Oracle Backend

set the ORACLE_HOME  variable of the user who run site
SuexecUserGroup inof inof
env |grep ORA
ORACLE_BASE=/usr/lib/oracle
ORACLE_HOME=/usr/lib/oracle/11.2/client64/

On 11 September 2012 03:05, Jon Blake <jc.bla...@gmail.com> wrote:

--
С уважением, Иван

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »