With Apache/Nginx on Ubuntu gettiing Error('01000', \"[01000] [unixODBC][Driver Manager]Can't open lib '/usr/local/nz/lib64/libnzodbc.so' : file not found (0) (SQLDriverConnect)\")"

47 views
Skip to first unread message

Moinuddin Quadri

unread,
Nov 15, 2016, 1:33:43 AM11/15/16
to pyodbc
I have configured PyODBC with Netteza SQL within Django application on Ubuntu 14.04 machine. It works fine with default Django Server and with Gunicorn. But when I run with Apache/Nginx I get "File not found error" for library.

I have seen these error in the past when:
  1. Dependent libraries are not installed. Since it is working with default Django server, I am discarding this issue
  2. Environment variable "LD_LIBRARY_PATH" not set. I tried setting these variable in `/etc/environment`, `/etc/profile`, `/etc/init.d/apache2` and settings file of Django. I am able to read these variables from within the Django's project. Value of these variable:

    'ODBCINI': '/home/mquadri/CONFIG/odbc.ini',
    'NETEZZA': '/usr/local/nz',
    'PATH': '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/nz/bin64',
    'NZ_ODBC_INI_PATH': '/home/mquadri/CONFIG',
    'LD_LIBRARY_PATH': '/usr/local/nz/lib64'

The another reason that I could think of was the issue related to permission on the file which apache/nginx are not able to read. In order to verify that I have set 777 permission on `/usr/local/nz` directory. Also added `www-data` user to `root` group. But still I get the same error. Does any one has any idea what might be going wrong here?
Reply all
Reply to author
Forward
0 new messages