1

I am trying to invoke a C-Program which returns the value for a given keyword from a configuration file

While trying to invoke program it's displaying below error:

**Testprintenv: error while loading shared libraries: libodbc.so.1: cannot open shared object file: No such file or directory**

We have installed EasySoft previously and uninstalled back (Removed all directories).

Below dependencies are showing up on Linux machine

-bash-4.1$ ldd Testprintenv
        linux-vdso.so.1 =>  (0x00007fffc0bdb000)
        libodbc.so.1 => not found
        libodbcinst.so.1 => not found
        libc.so.6 => /lib64/libc.so.6 (0x000000397b200000)
        /lib64/ld-linux-x86-64.so.2 (0x000000397ae00000)

When we try the same program on Solaris machine dependencies are showing up differently and executing without any error:

[Testuser]$ ldd Testprintenv
        libsocket.so.1 =>        /lib/libsocket.so.1
        libnsl.so.1 =>   /lib/libnsl.so.1
        libc.so.1 =>     /lib/libc.so.1
        libmp.so.2 =>    /lib/libmp.so.2
        libmd.so.1 =>    /lib/libmd.so.1
        libscf.so.1 =>   /lib/libscf.so.1
        libdoor.so.1 =>  /lib/libdoor.so.1
        libuutil.so.1 =>         /lib/libuutil.so.1
        libgen.so.1 =>   /lib/libgen.so.1
        libm.so.2 =>     /lib/libm.so.2
        /platform/SUNW,SPARC-Enterprise/lib/libc_psr.so.1

Any insight why the dependency (libodbc.so.1) is only showing up on Linux and how to resolve?

  • Can you give code of Testprintenv program? – cuonglm Jun 30 '14 at 8:15
  • Check for broken packages in your OS. For deciban sudo apt-get install – totti Jun 30 '14 at 8:31
  • What command is used to invoke the c program ? Can you show that program ? – totti Jul 4 '14 at 7:48
1

it appears that the odbc library has not been installed on your Linux system. use the appropriate package management system to add the library. here are a couple commands that would work for some common distributions:

for an RPM managed system like Centos, Redhat, or Fedora:

sudo yum install unixODBC

for a debian system like Ubuntu or Mint:

sudo apt-get install libodbc1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.