Raspberry-Pi-OS-64bit icon indicating copy to clipboard operation
Raspberry-Pi-OS-64bit copied to clipboard

error while loading shared libraries: libstdc++.so.6

Open jonmiller1 opened this issue 5 years ago • 3 comments

I'm running a program that uses opencv 4.4. I've got it opencv 4.4 compiled and installed but the program that works under 32-bit raspbian gives me this error on 64. I think I need to install lib32stdc++6 but it isn't in the apt-get repositories. Any ideas?

error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory

jonmiller1 avatar Aug 17 '20 20:08 jonmiller1

Are you able to do a native 64-bit build of your OpenCV application?

lurch avatar Aug 17 '20 23:08 lurch

You may be able to get this to work using multiarch:

  32 bit compatibility

It is possible to run 32 bit armhf binaries, such as *WXtoI*mg^1 <#sdfootnote1sym>:

Debian's multiarchsystem^2 <#sdfootnote2sym> provides asolution^3 <#sdfootnote3sym> by allowing an armhf capability to be added, as an additional supported architecture.

sudo dpkg --add-architecture armhf

To resolve an error around any package, usually a library package, requires installing the armhfversion of that package, denoted by an :armhfsuffix. If libX11.so.6, for example, is required:

sudo apt install libx11-6:armhf

WXtoImg, for example, requires2 further armhf libraries:

sudo apt-get install libxft2:armhf sudo apt-get install libasound2:armhf

1 <#sdfootnote1anc>This program is commercialwareabandonwarefreeware, with no source available. See https://wxtoimgrestored.xyz/beta/.

2 <#sdfootnote2anc>See https://wiki.debian.org/Multiarch/HOWTO.

3 <#sdfootnote3anc>Adapted from a description at https://github.com/raspberrypi/Raspberry-Pi-OS-64bit/issues/62#issuecomment-647459572.

Effectively that allows both 64 bit (arm64) and 32 bit (armhf) libraries to co-exist independently on the same machine.

Robin

On 17/08/2020 21:59, jonmiller1 wrote:

I'm running a program that uses opencv 4.4. I've got it opencv 4.4 compiled and installed but the program that works under 32-bit raspbian gives me this error on 64. I think I need to install lib32stdc++6 but it isn't in the apt-get repositories. Any ideas?

error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory

rag2 avatar Aug 20 '20 18:08 rag2

More info about this error (and a workaround) in #156

lurch avatar Jun 07 '21 08:06 lurch