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?

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

1 Answer 1

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .