Trying to set up ODBC on Ubuntu. osql is a great script to test it out, but running it on Ubuntu 10.10:

root:~# osql -S fcstest -U sa -P *****
osql: error: no potential directory strings in "/usr/local/bin/isql"
isql strings are:
+ /lib/ld-linux.so.2

So inspecting the code, I can extract the meaningful parts on RHEL, where it works:

ISQL=$(command -v isql)
strings ${ISQL} | grep ^/
/lib64/ld-linux-x86-64.so.2
/usr/local/lib

but on Ubuntu, the same sequence:

dchwalis:/usr/local/src$ strings ${ISQL} | grep ^/
/lib/ld-linux.so.2

Note the missing /usr/local/lib – the grep filters following will NEVER find any strings…

Maybe we should do this: RHEL:

$ ldd /usr/local/bin/isql
libodbc.so.1 => /usr/local/lib/libodbc.so.1 (0x00002b5b76eb4000)
...

and Ubuntu:

root:/usr/local/bin# ldd isql
libodbc.so.1 => /usr/local/lib/libodbc.so.1 (0x001cd000)

We can pull a path from that!