Error While loading shared libraries libstdc++.so.5
Asked Answered
E

2

8

I'm attempting to run a program called GlimmerHMM, however when I try to call the program I get this error:

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

So I tried downloading and installing:

sudo apt-get install libstdc++5
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
html2text libmail-sendmail-perl libsys-hostname-long-perl
Use 'apt-get autoremove' to remove them.
The following NEW packages will be installed: libstdc++5
0 upgraded, 1 newly installed, 0 to remove and 183 not upgraded.
Need to get 255 kB of archives.
After this operation, 1,155 kB of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu/ precise/universe libstdc++5 amd64 1:3.3.6-25ubuntu1 [255 kB]
Fetched 255 kB in 4s (54.0 kB/s)                     
Selecting previously unselected package libstdc++5.
(Reading database ... 176303 files and directories currently installed.)
Unpacking libstdc++5 (from .../libstdc++5_1%3a3.3.6-25ubuntu1_amd64.deb) ...
Setting up libstdc++5 (1:3.3.6-25ubuntu1) ...
Processing triggers for libc-bin ...
ldconfig deferred processing now taking place

But I still get the same error when calling the program. Thanks in advance!

Earthshine answered 16/1, 2013 at 3:7 Comment(2)
Did you find libstdc++.so.5 in /usr/lib/ now?Schonfield
in /usr/lib/ there is libstdc++.so, libstdc++.so.5, libstdc++.so.5.0.7, and then several libstdc++.so.6 files.Earthshine
P
10

Chances are that, if you're running a program old enough to need libstdc++ v5, it's also a 32-bit application, so it can't use the (64-bit) libstdc++5 you installed. Install the ia32-libs package.

Phototypy answered 16/1, 2013 at 3:26 Comment(3)
It didn't work for me. But I tried it and then worked: sudo ln -s /usr/lib64/libstdc++.so.5 /usr/lib/Seidler
I succeeded by using sudo apt-get install libstdc++5.i386 to get the 32-bit version into /usr/lib/i386-linux-gnu/libstdc++.so.5Nanon
sudo apt install libstdc++5:i386 (there is : and not . before i386)Swarthy
S
3

I was trying to get one legacy application working and noticed that with Ubuntu 20.04 one needs to add i386 architecture, before one can install i386 libraries.

sudo dpkg --add-architecture i386
sudo apt update
sudo apt install libstdc++5:i386

# libstdc++.so.5 shows up.
ls -la /usr/lib/i386-linux-gnu/libstdc++.so.5
lrwxrwxrwx 1 root root 18 Apr 11  2020 /usr/lib/i386-linux-gnu/libstdc++.so.5 -> libstdc++.so.5.0.7
Svend answered 28/8, 2021 at 7:57 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.