unixODBC Amazon Redshift问题无法打开lib'/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so':找不到文件

问题描述

我正在尝试设置unixODBC来访问Amazon Redshift,但是我一直收到此错误,我对设置进行了三遍检查,但不确定是什么问题

> 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

下面是我的.odbc.iniodbcinst.ini文件和详细信息

我当前的odbcinst -j设置是

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

我的odbcinst.ini文件具有适当的Redshift驱动程序,

[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

我已经验证了驾驶员的位置。

我的.odbc.inc

[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

我已将我的amazon.redshiftodbc.ini文件复制到/etc/添加了以下内容

[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

这是我当前的环境变量

export ODBCINI=~/.odbc.ini
export ODBCSYSINI=/etc
export AMAZONREDSHIFTODBCINI=/etc/amazon.redshiftodbc.ini

我现在不确定我在做什么错。 ibamazonredshiftodbc64.so存在,但unixODBC似乎找不到它

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)