Hi,
I am trying to connect to an Oracle database with the odbc and DBI packages on Mac. I recently started to get the following error (might related to updating OS to Catelina or updating the xcode on my machine) when trying to connect:
DBI::dbConnect(odbc::odbc(), dsn = "my_dsn",
UID = "my_uid",
PWD = "my_password")
Error: nanodbc/nanodbc.cpp:950: 01000: [unixODBC][Driver Manager]Can't open lib '/usr/local/lib/libsqora.dylib.18.1' : file not found
Since this file do exist on this folder I assume that the error-related to a path setting. Here is the current setting:
> odbcinst -j
unixODBC 2.3.7
DRIVERS............: /usr/local/etc/odbcinst.ini
SYSTEM DATA SOURCES: /usr/local/etc/odbc.ini
FILE DATA SOURCES..: /usr/local/etc/ODBCDataSources
USER DATA SOURCES..: /Users/ramikrispin/.odbc.ini
SQLULEN Size.......: 8
SQLLEN Size........: 8
SQLSETPOSIROW Size.: 8
Here is how the odbcinst.ini
file is set
[Oracle 18 ODBC driver]
Description = Oracle ODBC driver for Oracle 18
Driver = /usr/local/lib/libsqora.dylib.18.1
Which can be seen also with odbc::odbcListDrivers()
odbc::odbcListDrivers()
name attribute value
1 Oracle 18 ODBC driver Description Oracle ODBC driver for Oracle 18
2 Oracle 18 ODBC driver Driver /usr/local/lib/libsqora.dylib.18.1
odbc::odbcListDataSources()
name description
1 OracleODBC-18 Oracle 18 ODBC driver
Here is how the Oracle paths are set on the .zshrc
file:
# Oracle DB
export ORACLE_HOME=$HOME/Library/Caches/Homebrew/instantclient_18_1
export PATH=$PATH:$ORACLE_HOME
export TNS_ADMIN=$ORACLE_HOME/network/admin
I was trying to follow the steps on this topic to set the path correctly, and it did not work. Here is what I am getting when running otool -l libsqora.dylib.18.1
:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/objdump: error: 'libsqora.dylib.18.1': No such file or directory
Any suggestions?
Thanks,
Rami