.. failed to open library "libodbc.so.2": libodbc.so.2: cannot open shared object file: No such file or directory

Questions about Wine on Linux
Post Reply
vspin
Level 2
Level 2
Posts: 14
Joined: Thu Dec 31, 2020 2:27 am

.. failed to open library "libodbc.so.2": libodbc.so.2: cannot open shared object file: No such file or directory

Post by vspin » Thu Dec 31, 2020 8:29 pm

I run 32-bit apps from the terminal just fine, but when I run one in particular I get:

Code: Select all

008b:err:winediag:ODBC_LoadDriverManager failed to open library "libodbc.so.2": libodbc.so.2: cannot open shared object file: No such file or directory
While it does still run, how do I fix this?

I ran the following command (found in the forum. not sure it's relevant), and got the following output:

Code: Select all

dpkg -l *:i386 | grep -E 'mesa|libgl'

ii  libgl1:i386                         1.3.1-1ubuntu0.20.04.1            i386         Vendor neutral GL dispatch library -- legacy GL support
ii  libgl1-mesa-dri:i386                20.0.8-0ubuntu1~20.04.1           i386         free implementation of the OpenGL API -- DRI modules
ii  libglapi-mesa:i386                  20.0.8-0ubuntu1~20.04.1           i386         free implementation of the GL API -- shared library
ii  libglib2.0-0:i386                   2.64.3-1~ubuntu20.04.1            i386         GLib library of C routines
ii  libglu1-mesa:i386                   9.0.1-1build1                     i386         Mesa OpenGL utility library (GLU)
ii  libglvnd0:i386                      1.3.1-1ubuntu0.20.04.1            i386         Vendor neutral GL dispatch library
ii  libglx-mesa0:i386                   20.0.8-0ubuntu1~20.04.1           i386         free implementation of the OpenGL API -- GLX vendor library
ii  libglx0:i386                        1.3.1-1ubuntu0.20.04.1            i386         Vendor neutral GL dispatch library -- GLX support
ii  libosmesa6:i386                     20.0.8-0ubuntu1~20.04.1           i386         Mesa Off-screen rendering extension
ii  mesa-va-drivers:i386                20.0.8-0ubuntu1~20.04.1           i386         Mesa VA-API video acceleration drivers
ii  mesa-vdpau-drivers:i386             20.0.8-0ubuntu1~20.04.1           i386         Mesa VDPAU video acceleration drivers
ii  mesa-vulkan-drivers:i386            20.0.8-0ubuntu1~20.04.1           i386         Mesa Vulkan graphics drivers

vspin
Level 2
Level 2
Posts: 14
Joined: Thu Dec 31, 2020 2:27 am

Re: .. failed to open library "libodbc.so.2": libodbc.so.2: cannot open shared object file: No such file or directory

Post by vspin » Thu Dec 31, 2020 11:22 pm

I ran the following command, and got the following results.

Code: Select all

locate libodbc | grep "/usr/lib"

/usr/lib/x86_64-linux-gnu/libodbc.la
/usr/lib/x86_64-linux-gnu/libodbc.so
/usr/lib/x86_64-linux-gnu/libodbc.so.1
/usr/lib/x86_64-linux-gnu/libodbc.so.2
/usr/lib/x86_64-linux-gnu/libodbc.so.2.0.0
/usr/lib/x86_64-linux-gnu/libodbccr.la
/usr/lib/x86_64-linux-gnu/libodbccr.so
/usr/lib/x86_64-linux-gnu/libodbccr.so.1
/usr/lib/x86_64-linux-gnu/libodbccr.so.2
/usr/lib/x86_64-linux-gnu/libodbccr.so.2.0.0
/usr/lib/x86_64-linux-gnu/libodbcinst.la
/usr/lib/x86_64-linux-gnu/libodbcinst.so
/usr/lib/x86_64-linux-gnu/libodbcinst.so.1
/usr/lib/x86_64-linux-gnu/libodbcinst.so.2
/usr/lib/x86_64-linux-gnu/libodbcinst.so.2.0.0

vspin
Level 2
Level 2
Posts: 14
Joined: Thu Dec 31, 2020 2:27 am

Re: .. failed to open library "libodbc.so.2": libodbc.so.2: cannot open shared object file: No such file or directory

Post by vspin » Fri Jan 01, 2021 12:35 am

I also ran the following. Any ideas on what I can try?

Code: Select all

ldconfig -p | grep libodbc

	libodbcinst.so.2 (libc6,x86-64) => /lib/x86_64-linux-gnu/libodbcinst.so.2
	libodbcinst.so (libc6,x86-64) => /lib/x86_64-linux-gnu/libodbcinst.so
	libodbccr.so.2 (libc6,x86-64) => /lib/x86_64-linux-gnu/libodbccr.so.2
	libodbccr.so (libc6,x86-64) => /lib/x86_64-linux-gnu/libodbccr.so
	libodbc.so.2 (libc6,x86-64) => /lib/x86_64-linux-gnu/libodbc.so.2
	libodbc.so (libc6,x86-64) => /lib/x86_64-linux-gnu/libodbc.so

spoon0042
Level 5
Level 5
Posts: 451
Joined: Thu Dec 24, 2009 11:00 am

Re: .. failed to open library "libodbc.so.2": libodbc.so.2: cannot open shared object file: No such file or directory

Post by spoon0042 » Fri Jan 01, 2021 12:36 am

You appear to be missing the 32-bit lib package, probably libodbc1:i386. May not matter or may just make the error go away but that should be it.

vspin
Level 2
Level 2
Posts: 14
Joined: Thu Dec 31, 2020 2:27 am

Re: .. failed to open library "libodbc.so.2": libodbc.so.2: cannot open shared object file: No such file or directory

Post by vspin » Fri Jan 01, 2021 12:54 am

Cool! Thanks you. I had it installed but I removed it, and installed again, and now the error is gone.

vspin
Level 2
Level 2
Posts: 14
Joined: Thu Dec 31, 2020 2:27 am

Re: .. failed to open library "libodbc.so.2": libodbc.so.2: cannot open shared object file: No such file or directory

Post by vspin » Sun Jan 03, 2021 4:10 pm

Actually, you were right in that I didn't have the 32-bit lib package, and what I had done was remove the 64 bit version, and installed the 32 bit version which made everything work until another app on my server needed the 64 bit version. How do I install both the 32 bit and 64 bit libodbc1? My server is configured for both. 32 and 64 bit..

spoon0042
Level 5
Level 5
Posts: 451
Joined: Thu Dec 24, 2009 11:00 am

Re: .. failed to open library "libodbc.so.2": libodbc.so.2: cannot open shared object file: No such file or directory

Post by spoon0042 » Sun Jan 03, 2021 6:53 pm

To be sure both are installed you'd want

Code: Select all

sudo apt install libodbc1 libodbc1:i386

vspin
Level 2
Level 2
Posts: 14
Joined: Thu Dec 31, 2020 2:27 am

Re: .. failed to open library "libodbc.so.2": libodbc.so.2: cannot open shared object file: No such file or directory

Post by vspin » Sun Jan 03, 2021 7:01 pm

spoon0042 wrote:
Sun Jan 03, 2021 6:53 pm
To be sure both are installed you'd want

Code: Select all

sudo apt install libodbc1 libodbc1:i386
When I run, I get:

Code: Select all

The following packages have unmet dependencies:
 libodbc1 : Breaks: libodbc1:i386 (!= 2.3.7) but 2.3.6-0.1build1 is to be installed
 libodbc1:i386 : Breaks: libodbc1 (!= 2.3.6-0.1build1) but 2.3.7 is to be installed
E: Unable to correct problems, you have held broken packages.
If it helps, when I run the following, I get the following:

Code: Select all

apt policy libodbc1

libodbc1:
  Installed: 2.3.7
  Candidate: 2.3.7
  Version table:
 *** 2.3.7 500
        500 https://packages.microsoft.com/ubuntu/20.04/prod focal/main amd64 Packages
        100 /var/lib/dpkg/status
     2.3.6-0.1build1 500
        500 http://archive.ubuntu.com/ubuntu focal/main amd64 Packages

vspin
Level 2
Level 2
Posts: 14
Joined: Thu Dec 31, 2020 2:27 am

Re: .. failed to open library "libodbc.so.2": libodbc.so.2: cannot open shared object file: No such file or directory

Post by vspin » Sun Jan 03, 2021 7:39 pm

I've disabled packages from Microsoft, now I'm going to try to downgrade libodbc1, and try to install.
Last edited by vspin on Sun Jan 03, 2021 8:01 pm, edited 1 time in total.

vspin
Level 2
Level 2
Posts: 14
Joined: Thu Dec 31, 2020 2:27 am

Re: .. failed to open library "libodbc.so.2": libodbc.so.2: cannot open shared object file: No such file or directory

Post by vspin » Sun Jan 03, 2021 7:53 pm

That was it. I was using a newer version by Microsoft which was not compatible with libodbc1:i386. I disabled the Microsoft package URL, and downgraded libodbc1 to 2.3.6-0.1build1, and libodbc1:i386 installed just fine. Everything seems to be working now. :)

Post Reply