python - Trying to query SQL Server from django running on Linux - Can't open lib '/path/to/libtdsodbc.so' -


i have django site running on postgresql , i'm attempting pull data sql server in order populate form fields.

i can connect sql server , query database linux server using python pyodbc , freetds , under impression use same connection string in django view when tried got following error:

('01000', "[01000] [unixodbc][driver manager]can't open lib '/path/to/libtdsodbc.so' : file not found (0) (sqldriverconnect)")

i've tried changing file , folder permissions it's not got me anywhere, can connect via python not django.

i can connect command line in django applications folder using

manage.py shell 

any appreciated.

update:

the file exists, both django , python using same odbc , freetds config files.

i don't use virtualenv.

i did see few references /usr/lib/x86_64-linux-gnu/odbc/libtdsodbc.so when performing initial set under impression issues solve prevent python connecting also, not case?

update 2:

i've tried using pymssql , i'm getting similar results, works through python django i'm getting importerror:

libct.so.4: cannot open shared object file: no such file or directory

update - solved

@bradley.ayers comment in pil - libjpeg.so.8: cannot open shared object file: no such file or directory pointed me in right direction.

@user2725332 sorry posting answer instead of commenting on answer -- s.o. not let beginners that, suppose must preferred method me comment.

you bradley.ayers pointed in right direction; be helpful if tell solution worked you. adding directory contains driver /etc/ld.so.conf file, , running ldconfig? didn't work problem in my post

thanks, bh


Comments

Popular posts from this blog

Unable to remove the www from url on https using .htaccess -