Testprintenv:error while loading shared libraries:libodbc.so.1: cannot open shared object file
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
Related videos on Youtube
Ramu Pasupuleti
Updated on September 18, 2022Comments
-
Ramu Pasupuleti over 1 year
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?
-
cuonglm almost 10 yearsCan you give code of
Testprintenv
program? -
totti almost 10 yearsWhat command is used to invoke the c program ? Can you show that program ?
-