silicon mode silicon mode - 1 year ago 112
SQL Question

Linker errors with preventing pyODBC to MS SQL connection. CentOS 7

I am trying to connect from a python app with pyodbc to a MS SQL server. I have pyodbc and unixODBC installed and I tried to install the MS driver for linux. I think the issue is that the MS driver has missing dependencies but as near as I can tell the dependencies are installed. Because the Microsoft driver was not install-able through yum i had to wget and run the install script. So there Im sure there is some manual work I have to do to get the links missing below to resolve. I am not sure how to do this as I am new to this on Linux. I have included my config files also just in case.

When I run...

ldd /opt/microsoft/msodbcsql/lib64/

I get the following...

/opt/microsoft/msodbcsql/lib64/ /lib64/ version `GLIBCXX_3.4.20' not found (required by /opt/microsoft/msodbcsql/lib64/

/opt/microsoft/msodbcsql/lib64/ /lib64/ version `CXXABI_1.3.8' not found (required by /opt/microsoft/msodbcsql/lib64/ => (0x00007fff22b27000) => /lib64/ (0x00007f03de43f000) => /lib64/ (0x00007f03de22d000) => /lib64/ (0x00007f03de027000) => not found => /lib64/ (0x00007f03ddd42000) => not found => not found => /lib64/ (0x00007f03dda39000)


Any help or suggestions are welcome. Thank You!

Answer Source

I remember I had this issue too but it was more than one year ago and I don't have access to that server anymore.

As far as I can remember it was a version mismatch. If you see your ldd output they're looking for,, etc. Maybe you have different version of these library installed on your system.

By looking my installation notes it looks like I fixed the issue by creating (soft) links "pointing" the libraries I had on my system. And - of course - I gave these links the names msodbc was looking for. Yes... a little bit "rude" but it worked for me.