Sqlcmd Not Able to Find a Library (Libmsodbcsql-17.0.So.1.1) That Is There

sqlcmd not able to find a library (libmsodbcsql-17.0.so.1.1) that is there

I have same problem, this solution worked for me:
you have to downgrade the msodbcsql version,

  1. apt-get remove msodbcsql
  2. apt-cache madison msodbcsql
  3. apt-get install msodbcsql=13.1.9.2-1
  4. apt-cache madison mssql-tools
  5. ACCEPT_EULA=Y apt-get install mssql-tools=14.0.6.0-1
  6. apt-mark hold mssql-tools
  7. apt-mark hold msodbcsql

I got this solution from this link:

https://github.com/Microsoft/msphpsql/issues/684

Linker errors with libmsodbcsql-13.0.so.0.0 preventing pyODBC to MS SQL connection. CentOS 7

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 libgss.so.3, libcrypto.so.1.0.0, 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.

Can't open lib 'ODBC Driver 13 for SQL Server'? Sym linking issue?

Running:

odbcinst -j

It yielded:

unixODBC 2.3.4
DRIVERS............: /etc/odbcinst.ini
SYSTEM DATA SOURCES: /etc/odbc.ini
FILE DATA SOURCES..: /etc/ODBCDataSources
USER DATA SOURCES..: /Users/emehex/.odbc.ini
SQLULEN Size.......: 8
SQLLEN Size........: 8
SQLSETPOSIROW Size.: 8

Instead of copying the files to the /etc/ directory (not sure why unixODBC thought they were there) I created a symbolic link to each file:

sudo ln -s /usr/local/etc/odbcinst.ini /etc/odbcinst.ini
sudo ln -s /usr/local/etc/odbc.ini /etc/odbc.ini

This solved the problem.

Linux python3 - Can't open lib 'SQL Server'

I also recommend you install the ODBC Driver and then try to use pyodbc. I am assuming you are on an Ubuntu 15.04+ machine.

To install the ODBC Driver follow the following instructions:

sudo su
wget https://gallery.technet.microsoft.com/ODBC-Driver-13-for-Ubuntu-b87369f0/file/154097/2/installodbc.sh
sh installodbc.sh

Once you do that, install pyodbc using pip and try the following script:

import pyodbc
server = 'tcp:myserver.database.windows.net'
database = 'mydb'
username = 'myusername'
password = 'mypassword'
cnxn = pyodbc.connect('DRIVER={ODBC Driver 13 for SQL Server};SERVER='+server+';DATABASE='+database+';UID='+username+';PWD='+ password)
cursor = cnxn.cursor()
cursor.execute("SELECT @@version;")
row = cursor.fetchone()
while row:
print row
row = cursor.fetchone()

Let me know how that goes.

Cheers,

Meet



Related Topics



Leave a reply



Submit