Score:0

Error installing Microsoft ODBC 17 driver

in flag
skd

I'm trying to install the Microsoft ODBC Driver 17 in Ubuntu 20.04 following the instructions from here.

However, when I type

sudo ACCEPT_EULA=Y apt-get install -y msodbcsql17

I get the following error:

Reading package lists... Done
Building dependency tree
Reading state information... Done
msodbcsql17 is already the newest version (17.10.2.1-1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up msodbcsql17 (17.10.2.1-1) ...
odbcinst: symbol lookup error: odbcinst: undefined symbol: iniOpen
dpkg: error processing package msodbcsql17 (--configure):
 installed msodbcsql17 package post-installation script subprocess returned error exit status 127
Errors were encountered while processing:
 msodbcsql17
E: Sub-process /usr/bin/dpkg returned an error code (1)

odbcinst seems to be correctly installed:

odbcinst -j
unixODBC 2.3.11
DRIVERS............: /usr/local/etc/odbcinst.ini
SYSTEM DATA SOURCES: /usr/local/etc/odbc.ini
FILE DATA SOURCES..: /usr/local/etc/ODBCDataSources
USER DATA SOURCES..: /home/atorres/.odbc.ini
SQLULEN Size.......: 8
SQLLEN Size........: 8
SQLSETPOSIROW Size.: 8

I tried purging and reinstalling unixodbc and odbcinst but it did not work. I've also had no luck with sudo dpkg --configure -a. Any idea what may be wrong with my system?

skd avatar
in flag
skd
Its 20.04, I made a typo. It should be correct now
cn flag
if the anwser does not fix it please edit into the q how far you get and I will either update or remove it :)
Score:0
cn flag

If I remember correctly you forgot part of the instal. odbcinst -i will show the same error (so it is not related to apt but the execution of the setup after installing).

You need one of more of these:

sudo apt install odbcinst libsqliteodbc, msodbcsql17, odbc-postgresql, tdsodbc mysql-connector-odbc

If you need to reset odbcinst, before installing it again, remove

/usr/bin/odbcinst 
/etc/odbcinst.ini 
/usr/share/man/man1/odbcinst.1.gz
skd avatar
in flag
skd
I will try that and report back, although the official Microsoft instructions do not mention anything about this. I assumed apt should handle the dependencies automatically.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.