I am attempting to install an odbc driver on my CentOS 7 server. I'm following the instructions for installing the driver here(pdf).
After downloading the rpm file with wget and running with yum localinstall I see a summary in the shell and it looks like the driver installed.
yum list | grep SimbaAthenaODBC
SimbaAthenaODBC-64bit.x86_64 1.0.5-1 installed
Where I'm getting confused is in specifying the odbc driver manager for my machine.
From the documentation:
You need to make sure that your machine uses the correct ODBC driver manager to load the driver. To do this, set the library path environment variable
After I installed above the instructions say
"The Simba Athena ODBC Driver files are installed in the /opt/simba/athenaodbc directory."
Sure enough:
ls -l /opt/simba/athenaodbc/
total 1616
drwxr-xr-x 3 root root 19 Jun 25 23:34 ErrorMessages
-rwxr-xr-x 1 root root 27970 Feb 26 07:33 EULA.txt
drwxr-xr-x 3 root root 16 Jun 25 23:34 lib
-rwxr-xr-x 1 root root 9162 Feb 26 07:33 release-notes.txt
drwxr-xr-x 2 root root 42 Jun 25 23:34 Setup
-rwxr-xr-x 1 root root 1612290 Feb 26 07:33 Simba Athena ODBC Install and Configuration Guide.pdf
Then one more snippet from the documentation:
If you are using a Linux machine, then set the LD_LIBRARY_PATH environment variable to include the paths to the ODBC driver manager libraries. For example, if the libraries are installed in /usr/local/lib, then run the following command to set LD_LIBRARY_PATH for the current user session:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
When I visit this example path /usr/local/lib
it's currently an empty directory.
Do I want to set the environment variable LD_LIBRARY_PATH to /opt/simba/athenaodbc/?
I'm confused because the documentation tells me the driver files are stored in /opt/simba/athenaodbc/
however the example of setting a environment variable uses /usr/local/lib
.
How should I specify which driver manager my machine should use?
LD_LIBRARY_PATH
must include both the directory holding the ODBC driver and the ODBC driver manager.
So, you must locate the ODBC Driver Manager on your Linux machine, typically either iODBC or UnixODBC. You should be able to find these libraries with a command like
find / -name 'lib*odbc*.so*' -print
You'll need to add that directory as well as /opt/simba/athenaodbc
to your LD_LIBRARY_PATH
, with a command like --
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/simba/athenaodbc:/path/to/dir/containing/lib*odbc*.so*
Note 1 -- /path/to/dir/containing/lib*odbc*.so*
is a placeholder in the command above. You must change this to the correct local directory, probably something like /usr/lib
or /lib
.
*Note 2 -- this is adding the two new directories to any existing LD_LIBRARY_PATH
value, not setting LD_LIBRARY_PATH
to only those two directories.*