Search code examples
linuxoracle-databaseubuntuunixodbc

Connecting Oracle using unixODBC: Can't open lib '/usr/lib/oracle/12.1/client/lib/libsqora.so.12.1'


I am trying to connect to Oracle using unixODBC but it doesn't work. So far I have tried to follow How do I setup Oracle ODBC drivers on RHEL 6/Linux . When I try to connect using isql I get following:

user@user:~$ isql -v oracle-jono
[01000][unixODBC][Driver Manager]Can't open lib '/usr/lib/oracle/12.1/client/lib/libsqora.so.12.1' : file not found
[ISQL]ERROR: Could not SQLConnect

I have checked that /usr/lib/oracle/12.1/client/lib/libsqora.so.12.1 exists. When I run ldd command it says that libclntsh.so.12.1 is not found:

user@user:~$ ldd /usr/lib/oracle/12.1/client/lib/libsqora.so.12.1
        linux-gate.so.1 =>  (0xb772e000)
        libdl.so.2 => /lib/i386-linux-gnu/libdl.so.2 (0xb7573000)
        libm.so.6 => /lib/i386-linux-gnu/libm.so.6 (0xb752d000)
        libpthread.so.0 => /lib/i386-linux-gnu/libpthread.so.0 (0xb7510000)
        libnsl.so.1 => /lib/i386-linux-gnu/libnsl.so.1 (0xb74f7000)
        librt.so.1 => /lib/i386-linux-gnu/librt.so.1 (0xb74ee000)
        libclntsh.so.12.1 => not found
        libodbcinst.so.2 => /usr/local/lib/libodbcinst.so.2 (0xb74d8000)
        libc.so.6 => /lib/i386-linux-gnu/libc.so.6 (0xb7329000)
        /lib/ld-linux.so.2 (0xb7730000)
        libltdl.so.7 => /usr/lib/i386-linux-gnu/libltdl.so.7 (0xb731e000)

In other questions/answers (like https://dba.stackexchange.com/questions/12005/oracle11-2g-post-installation-problem-on-oracle-linux-kernel) there is this libclntsh.so.12.1 file but I don't have it. So I can't even try to link/chmod it.

Where could I get missing libclntsh.so.12.1? Or is there some other issues which I don't know?


Solution

  • The solution was to install also basic packages from http://www.oracle.com/technetwork/topics/linuxsoft-082809.html . I had only installed ODBC packages.