I am trying to set up unixODBC to access Amazon Redshift and I keep getting this error, I have triple checked my setup but not sure what the issue is
> isql -v mlaws
[01000][unixODBC][Driver Manager]Can't open lib '/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so' : file not found
[ISQL]ERROR: Could not SQLConnect
Below are my .odbc.ini
and odbcinst.ini
files and details
my current odbcinst -j
setting is,
unixODBC 2.3.4
DRIVERS............: /etc/odbcinst.ini
SYSTEM DATA SOURCES: /etc/odbc.ini
FILE DATA SOURCES..: /etc/ODBCDataSources
USER DATA SOURCES..: /home/fuxi/.odbc.ini
SQLULEN Size.......: 8
SQLLEN Size........: 8
SQLSETPOSIROW Size.: 8
my odbcinst.ini
file has the appropriate Redshift Driver,
[PostgreSQL ANSI]
Description=PostgreSQL ODBC driver (ANSI version)
Driver=psqlodbca.so
Setup=libodbcpsqlS.so
Debug=0
CommLog=1
UsageCount=1
[PostgreSQL Unicode]
Description=PostgreSQL ODBC driver (Unicode version)
Driver=psqlodbcw.so
Setup=libodbcpsqlS.so
Debug=0
CommLog=1
UsageCount=1
[Amazon Redshift (x64)]
Description=Amazon Redshift ODBC Driver(64-bit)
Driver=/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so
I have verified the driver location.
My .odbc.inc
is,
[personal]
Driver = PostgreSQL Unicode
ServerName = ---.---.---.---
Port = 5432
Database = db1
Username = uuuuuu
Password = xxxxxx
Debug = 1
[mlaws]
Driver = Amazon Redshift (x64)
ServerName = <link>
Port = 5439
Database = db
Username = uuuuuu
Password = xxxxxx
I have copied my amazon.redshiftodbc.ini
file to /etc/
and added the following to it
[Driver]
## - DriverManagerEncoding is detected automatically.
## Add DriverManagerEncoding entry if there is a need to specify.
DriverManagerEncoding = UTF-16
ErrorMessagesPath=/opt/amazon/redshiftodbc/ErrorMessages
LogLevel=0
LogPath=[LogPath]
SwapFilePath=/tmp
ODBCInstLib=/usr/lib/x86_64-linux-gnu/libodbcinst.so.1
Here are my current environment variables
export ODBCINI=~/.odbc.ini
export ODBCSYSINI=/etc
export AMAZONREDSHIFTODBCINI=/etc/amazon.redshiftodbc.ini
I am not really sure what I am doing wrong at this point. ibamazonredshiftodbc64.so
exist where its suppose to, but unixODBC just can't seem to find it