ODBC 3.x Troubleshooting: UNIX Configuration
If FME cannot load the ODBC format readers or writers, it is usually because the UNIX environment has not been correctly configured.
The following suggestions can often help detect and overcome such problems.
- A compatible version of unixODBC must be installed. On Linux, this is a version that provides libodbc.so.1.0.0, and on OSX, this is a version that provides libodbc.2.dylib.
- unixODBC 2.3.0 provides a compatible libodbc.so.1.0.0. On Linux. unixODBC 2.3.2 (latest) provides a compatible libodbc.2.dylib.
- On OSX, the environmental variable DYLD_LIBRARY_PATH must contain a path that contains the ODBC library. By default, the unixODBC installer does not set this path. By default, it is installed to /usr/local/lib/.
- In most cases, unixODBC can be obtained through your package manager (usually yum or dpkg on Linux and brew on OSX) However it might not always provide a version of libodbc that is compatible with FME. Using the command find / -name libodbc* will find all of the ODBC libraries on a given machine. If an incompatible library is found (for example, libodbc.so.2.0.0 on Linux), FME will not be able to load ODBC2.
- To ensure a compatible version of unixODBC is present, build a tar.gz of the correct version for your platform from unixodbc.org. These packages have been tested to include the correct library files.
Sample UNIX Environment Variables
Variable | Contents | Sample Value |
---|---|---|
DYLD_LIBRARY_PATH |
On OSX, this must point to the ODBC lib. Note: This variable is not set during installation. |
${LD_LIBRARY_PATH}: /usr/local/lib |
LD_LIBRARY_PATH |
On Linux, this variable is usually set by default, during unixODBC's installation. However, if FME cannot find unixODBC, setting this variable will allow FME to find it. |
${LD_LIBRARY_PATH}:${FME_HOME}: /usr/lib/x86_64-linux-gnu/ |