Error install ODBC Driver on Ubuntu 18

Hello there,

I am trying to install the ODBC Driver on my Ubuntu VM to be able to connect my superset with DremIO DB.

I run the following command and I get these errors. Can you please let me know how to resolve this.?

I downloaded the package locally on Ubuntu Box.

sudo yum localinstall /home/user/Downloads/dremio-odbc-1.4.2.1003-1.x86_64.rpm

Error: Package: dremio-odbc-1.4.2.1003-1.x86_64 (/dremio-odbc-1.4.2.1003-1.x86_64)
Requires: libdl.so.2(GLIBC_2.2.5)(64bit)
Error: Package: dremio-odbc-1.4.2.1003-1.x86_64 (/dremio-odbc-1.4.2.1003-1.x86_64)
Requires: libstdc++.so.6(GLIBCXX_3.4.6)(64bit)
Error: Package: dremio-odbc-1.4.2.1003-1.x86_64 (/dremio-odbc-1.4.2.1003-1.x86_64)
Requires: libgssapi_krb5.so.2(gssapi_krb5_2_MIT)(64bit)
Error: Package: dremio-odbc-1.4.2.1003-1.x86_64 (/dremio-odbc-1.4.2.1003-1.x86_64)
Requires: libstdc++.so.6(CXXABI_1.3.1)(64bit)
Error: Package: dremio-odbc-1.4.2.1003-1.x86_64 (/dremio-odbc-1.4.2.1003-1.x86_64)
Requires: libkrb5.so.3(krb5_3_MIT)(64bit)
Error: Package: dremio-odbc-1.4.2.1003-1.x86_64 (/dremio-odbc-1.4.2.1003-1.x86_64)
Requires: librt.so.1()(64bit)
Error: Package: dremio-odbc-1.4.2.1003-1.x86_64 (/dremio-odbc-1.4.2.1003-1.x86_64)
Requires: libpthread.so.0(GLIBC_2.3.2)(64bit)
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest

@Kalyan

yum is only for RHEL/CentOS Linux. You can use Alien to convert RPM to DEB

Thanks
@balaji.ramaswamy

@balaji.ramaswamy - Thanks Balaji. That worked, I was able to install the ODBC Driver.
On Windows I was able to follow this documentation and get Dremio DB Connected.
https://docs.dremio.com/drivers/dremio-connector.html

On Linux, it just says install ODBC Driver. But doesnt say, anything on how to configure the DSN Settings. Can you please provide some documentation on how to Connect to DremIO Dataset from Superset on Linux.

@Kalyan

Is the ODBC Linux SSL enabled?

@balaji.ramaswamy - I am sorry. I don’t know the answer. Can you let me know, how to check if its SSL enabled?

@Kalyan,

Your ODBC client tools will reference a couple of files when trying to connect to Dremio:
odbc.ini and odbcinst.ini. The Dremio driver ships with examples of these, though I’m not sure if after the rpm package has been converted to .deb (using alien), if it installs these system-wide.

Do you see these in /etc/odbc directory?

Ubuntu ODBC reference: http://manpages.ubuntu.com/manpages/cosmic/man5/odbc.ini.5.html

@balaji.ramaswamy

getting this error on ubuntu

alien -d -c dremio-odbc-1.4.2.1003-1.x86_64.rpm

root@ubuntu-7cc7b8578c-s4j46:~# dpkg -i dremio-odbc_1.4.2.1003-2_amd64.deb
(Reading database … 14844 files and directories currently installed.)
Preparing to unpack dremio-odbc_1.4.2.1003-2_amd64.deb …
Unpacking dremio-odbc (1.4.2.1003-2) over (1.4.2.1003-2) …
> /var/lib/dpkg/info/dremio-odbc.postrm: line 2: [: upgrade: integer expression expected
Setting up dremio-odbc (1.4.2.1003-2) …
> /var/lib/dpkg/info/dremio-odbc.postinst: line 5: [: configure: integer expression expected
Processing triggers for libc-bin (2.27-3ubuntu1) …
root@ubuntu-7cc7b8578c-s4j46:~#

there really should be an official package for Ubuntu

1 Like

Hi, @balaji.ramaswamy @smora @mingfang Did you find any solution to this problem.

I am getting same
> /var/lib/dpkg/info/dremio-odbc.postrm: line 2: [: upgrade: integer expression expected
error for installing dremio-odbc driver on linux through alien after converting the .deb to .rpm package.

@tahmad this worked for me
alien -i /tmp/dremio-odbc-1.4.2.1003-1.x86_64.rpm

Thanks for the reply.

For me on Ubuntu 18.04, it seems driver has been installed:

sudo alien -i dremio-odbc-1.4.2.1003-1.x86_64.rpm 
Warning: Skipping conversion of scripts in package dremio-odbc: postinst postrm
Warning: Use the --scripts parameter to include the scripts.
	dpkg --no-force-overwrite -i dremio-odbc_1.4.2.1003-2_amd64.deb
dpkg: warning: downgrading dremio-odbc from 1.5.1.1001-2 to 1.4.2.1003-2
(Reading database ... 240596 files and directories currently installed.)
Preparing to unpack dremio-odbc_1.4.2.1003-2_amd64.deb ...
Unpacking dremio-odbc (1.4.2.1003-2) over (1.5.1.1001-2) ...
Setting up dremio-odbc (1.4.2.1003-2) ...
Processing triggers for libc-bin (2.27-3ubuntu1.3) ...

But in /opt/dremio-odbc/lib64/dremio.drillodbc.ini it shows only:

[Driver]
DisableAsync=0
ErrorMessagesPath=/opt/dremio-odbc/share/ErrorMessages
LogLevel=0
LogPath=/tmp
SwapFilePath=/tmp

and in /etc/odbcinst.ini only MS ODBC driver is listed.

[ODBC Driver 17 for SQL Server]
Description=Microsoft ODBC Driver 17 for SQL Server
Driver=/opt/microsoft/msodbcsql17/lib64/libmsodbcsql-17.7.so.2.1
UsageCount=1

When I try to connect the ODBC it gives me this error:

Traceback (most recent call last):
  File "connect.py", line 30, in <module>
    cnxn=pyodbc.connect(dsn='Dremio ODBC 64-bit',autocommit=True)
pyodbc.InterfaceError: ('IM002', '[IM002] [unixODBC][Driver Manager]Data source name not found and no default driver specified (0) (SQLDriverConnect)')

I also manually set driver path in /usr/local/etc/odbcinst.ini:

[Dremio ODBC 64-bit]
Description=Dremio ODBC 64-bit Driver
Driver=/opt/dremio-odbc/lib64/libdrillodbc_sb64.so
UsageCount=1

And in connection with driver="/opt/dremio-odbc/lib64/libdrillodbc_sb64.so" it says:

Traceback (most recent call last):
  File "connect.py", line 31, in <module>
    cnxn=pyodbc.connect('Driver=driver;SERVER=localhost;PORT=9047;DATABASE=Samples;UID=user;PWD=password;')
pyodbc.Error: ('01000', "[01000] [unixODBC][Driver Manager]Can't open lib 'driver' : file not found (0) (SQLDriverConnect)")

And if I use conn with cnxn=pyodbc.connect(dsn='Dremio ODBC 64-bit',autocommit=True)

Traceback (most recent call last):
  File "connect.py", line 30, in <module>
    cnxn=pyodbc.connect(dsn='Dremio ODBC 64-bit',autocommit=True)
pyodbc.InterfaceError: ('IM002', '[IM002] [unixODBC][Driver Manager]Data source name not found and no default driver specified (0) (SQLDriverConnect)')

you may have to manually update /etc/odbc.ini and /etc/odbcinst.ini
update .so path if required

cat odbc.ini
[ODBC Data Sources]
Dremio ODBC 64-bit=Dremio ODBC Driver 64-bit

[Dremio ODBC 64-bit]
Description=Dremio ODBC Driver (64-bit) DSN
Driver=/opt/dremio-odbc/lib64/libdrillodbc_sb64.so
ConnectionType=Direct
HOST=[HOST]
PORT=[PORT]
ZKQuorum=[Zookeeper Quorum]
ZKClusterID=[Cluster ID]
AuthenticationType=Plain
UID=[USERNAME]
PWD=[PASSWORD]
DelegationUID=
AdvancedProperties=CastAnyToVarchar=true;HandshakeTimeout=5;QueryTimeout=180;TimestampTZDisplayTimezone=utc;NumberOfPrefetchBuffers=5;
Catalog=DREMIO
Schema=
SSL=0
DisableHostVerification=0
DisableCertificateVerification=0
TrustedCerts=/opt/dremio-odbc/lib64/cacerts.pem
UseSystemTrustStore=0
UseExactTLSProtocolVersion=0
Min_TLS=
TLSProtocol=

cat odbcinst.ini
[Dremio ODBC Driver 64-bit]
Description=Dremio ODBC Driver(64-bit)
Driver=/opt/dremio-odbc/lib64/libdrillodbc_sb64.so
UsageCount=1

Thanks you so much @smora . I have updated these files and it worked with this simple connection string example.

You can get this script to run successfully on Ubuntu by changing all instances of single brackets to double ( [ → [[ ; ] → ]] ). The suggestions of adding the Dremio driver info to your ODBC config files will accomplish the same work.