Error Loading Cx_oracle Module Libclntsh.so.10.1
instructions: Windows Mac Red Hat Linux Ubuntu Click URL instructions: Right-click on ad, choose "Copy Link", then paste here → (This may not be possible with some types of ads) More information about our ad policies X You seem to have CSS turned off. Please don't fill out this field. You seem to have CSS turned off. Please don't fill out this field. Briefly describe the problem (required): Upload screenshot of ad (required): Select a file, or drag & drop file here. ✔ ✘ Please provide the ad click URL, if possible: Home Browse cx_Oracle Mailing Lists cx_Oracle Brought to you by: atuining Summary Files Reviews Support Mailing Lists Donate cx-oracle-users [cx-oracle-users] TemplateSyntaxError: Caught ImproperlyConfigured while rendering: Error loading cx_Oracle module: libclntsh.so.10.1: cannot open shared object file: No such file or directory [cx-oracle-users] TemplateSyntaxError: Caught ImproperlyConfigured while rendering: Error loading cx_Oracle module: libclntsh.so.10.1: cannot open shared object file: No such file or directory From: juhui
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community https://sourceforge.net/p/cx-oracle/mailman/message/24789467/ Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Issue building cx_Oracle - libclntsh.so.11.1 => not found up vote 24 down vote favorite 4 I'm trying to build cx_Oracle for a Python 2.7.2 and Oracle 11g http://stackoverflow.com/questions/11654090/issue-building-cx-oracle-libclntsh-so-11-1-not-found installation but the built cx_Oracle.so cannot find libclntsh.so.11.1 so importing cx_Oracle in Python fails. /mypath/cx_Oracle-5.1.1/build/lib.linux-x86_64-2.7-11g]$ ldd cx_Oracle.so libclntsh.so.11.1 => not found libpthread.so.0 => /lib64/libpthread.so.0 (0x00002ae9be290000) libc.so.6 => /lib64/libc.so.6 (0x00002ae9be4ab000) /lib64/ld-linux-x86-64.so.2 (0x000000389b600000) I have libclntsh.so.11.1 in my Oracle client installation directory: /apps/oracle/client/11.2.0.1/home1/lib]$ ls -l libclntsh.so* libclntsh.so -> /apps/oracle/client/11.2.0.1/home1/lib/libclntsh.so.11.1 libclntsh.so.11.1 And the cx_Oracle setup.py is picking this lib dir up: /mypath/cx_Oracle-5.1.1]$ python2.7 setup.py build /apps/oracle/client/11.2.0.1/home1/ running build running build_ext building 'cx_Oracle' extension gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/apps/oracle/client/11.2.0.1/home1/rdbms/demo -I/apps/oracle/client/11.2.0.1/home1/rdbms/public -I/apps/bweb/python-2.7.2/include/python2.7 -c cx_Oracle.c -o build/temp.linux-x86_64-2.7-11g/cx_Oracle.o -DBUILD_VERSION=5.1.1 In file included from /apps/oracle/client/11.2.0.1/home1/rdbms/public/oci.h:3024, from cx_Oracle.c:10: /apps/oracle/client/11.2.0.1/home1/rdbms/public/ociap.h:10788: warning: function declaration isn't a prototype /apps/oracle/client/11.2.0.1/home1/rdbms/public/ociap.h:10794: warning: function declaration isn't a prototype gcc -pthread -shared build/temp.linux-x86_64-2.7-11g/cx_Oracle.o -L/apps/oracle/client/11.2.0.1/home1/lib -lclntsh -o build/lib.linux-x86_64-2.7-11g/cx_Oracle.so Is something obviously wrong with this setup? Thanks UPDATE My LD_LIBRARY_PATH contains the lib directory above with libclntsh.so.11.1 $ echo $LD_LIBRARY_PATH /apps/oracle/client/11.2.0.1/lib This doesn't seem to make any difference. I rebuild the cx_Oracle
ykyuen Leave a comment I have setup the cx_Oracle and i could query the data thru the custom https://eureka.ykyuen.info/2014/11/07/python-cx_oracle-throws-missing-libclntsh-so-11-1-when-executed-by-django-chronograph/ django-admin command. Python - Install cx_Oracle Django – Create custom django-admin command Django – Schedule django-admin command using django-chronograph But when http://serverfault.com/questions/290362/setting-environment-variables-in-mod-wsgi-for-django i try to schedule the custom command using django-chronograph. It throws the following error. Traceback (most recent call last): File "query.py", line error loading 7, in ? import cx_Oracle ImportError: libclntsh.so.11.1: cannot open shared object file: No such file or directory After spending a whole afternoon checking the root cause. I found that the django-chronograph fails to read those required libs inside $ORACLE_HOME/lib. I have tried to error loading cx_oracle move the $ORACLE_HOME and $LD_LIBRARY_PATH declaration from profile.d (Valid for interactive shell only) to .bashrc. But still no luck. Finally, i have to create some symbolic links to resolve the problem. /usr/lib64/libclntsh.so.11.1 -> /usr/lib/oracle/11.2/client64/lib/libclntsh.so.11.1 /usr/lib64/libnnz11.so -> /usr/lib/oracle/11.2/client64/lib/libnnz11.so /usr/lib64/libocci.so.11.1 -> /usr/lib/oracle/11.2/client64/lib/libocci.so.11.1 /usr/lib64/libociei.so -> /usr/lib/oracle/11.2/client64/lib/libociei.so /usr/lib64/libsqlplusic.so -> /usr/lib/oracle/11.2/client64/lib/libsqlplusic.so /usr/lib64/libsqlplus.so -> /usr/lib/oracle/11.2/client64/lib/libsqlplus.so Not a elegant solution. Please let me know if u have a better idea. Done =) Reference: [cx-oracle-users] CentOS 5, Oracle 11g RPM Binary install - libclntsh.so.11.1: Share this:TweetMorePrintEmailShare on TumblrPocketLike this:Like Loading... Related cx_OracleDjangodjango-chronographOraclePython Post navigation Previous PostPython - Install cx_OracleNext Post陶傑 - 黨性和人性 Leave a Reply Cancel reply Enter your comment here... Fill in your details below or click an icon to log in: Email (required) (Address never made public) Name (required) Website You are commenting using yo
Start here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Server Fault Questions Tags Users Badges Unanswered Ask Question _ Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute: Sign up Here's how it works: Anybody can ask a question Anybody can answer The best answers are voted up and rise to the top Setting environment variables in mod_wsgi for Django up vote 2 down vote favorite 1 I'm running Django on an RHEL instance under Apache/mod_wsgi, and I'm having issues setting some environment variables for the Python process. All of the components (Apache, Python, mod_wsgi, external libraries) are built from source, not installed from the repos. The specific issue is support for Oracle support. I am able to connect to Oracle instances without a problem if I set the ORACLE_HOME and LD_LIBRARY_PATH on the command line when firing up Python myself, but I can't seem to get those variables passed through to the WSGI process. The specific error message I get in the Apache logs is: ImproperlyConfigured: Error loading cx_Oracle module: libclntsh.so.11.1: cannot open shared object file: No such file or directory I have tried setting the variables in the VirtualHost (using SetEnv), Apache's envvars file, the apache user's .bashrc file, and the .wsgi file (using os.environ['ORACLE_HOME']='...'), all with no effect. In the first three cases, the variables don't seem to make to to Python at all--printing os.environ['ORACLE_HOME'] indicates that no value has been set. I have also tried rebuilding mod_wsgi.so from source with the LD_RUN_PATH evn var set, per the advice here: http://groups.google.com/group/modwsgi/browse_thread/thread/91dfa97330dfca2/474f818304d741d4 However, that was also ineffective. What am I missing? How can I get those env vars successfully passed through? Thanks in advance! apache-2.2 oracle django mod-wsgi share|improve this question edited Jul 14 '11 at 17:31 asked Jul 14 '11 at 14:19 Michael C. O'Connor 11117 add a comment| 4 Answers 4 active oldest votes up vote 2 down vote In Ubuntu, placing export ORACLE_HOME=