"Invalid magic number" errors indicate a "bitness" mismatch -- a 32-bit application trying to load a 64-bit library, or a 64-bit application trying to load a 32-bit library.
On Mac OS X and most Unix-like OS, you can check the bitness of any file with a simple command --
file /path/to/file
On 64-bit Windows, 32-bit components are generally installed within the Programs (x86) or (counterintuitively) the SysWow64 directories.
64-bit components are generally installed within the Programs or (counterintuitively) the System32 directories.
On a client host (whether Single-Tier or Multi-Tier), the bitness of the client application (e.g., HSODBC, DG4ODBC, Crystal Reports, Microsoft Excel) forces the bitness of the data access driver and/or driver manager. On Single-Tier client hosts, the bitness of the client application also mandates the bitness of the DBMS client libraries (e.g., libesql92.so, libifsql.so).
On a Multi-Tier Broker host, the bitness of the DBMS client libraries (e.g., libesql92.so, libifsql.so) forces the bitness of the Request Broker and Database Agent.
If you have both 32-bit and 64-bit components present, this error can be resolved by ensuring that all executable and shared library path (e.g., PATH, LD_LIBRARY_PATH, SHLIB_PATH, LIBPATH) variables are set to target components of the same bitness.
If you do not have both 32-bit and 64-bit components present, determine the bitness of the "controlling" components, and acquire and/or install the other components to match.