7

我正在尝试运行一个名为 GlimmerHMM 的程序,但是当我尝试调用该程序时出现此错误:

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

所以我尝试下载和安装:

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

但是我在调​​用程序时仍然遇到同样的错误。提前致谢!

4

2 回答 2

10

很有可能,如果您运行的程序老得需要libstdc++v5,它也是一个 32 位应用程序,因此它不能使用libstdc++5您安装的(64 位)。安装ia32-libs软件包。

于 2013-01-16T03:26:17.993 回答
1

我试图让一个遗留应用程序工作,并注意到使用 Ubuntu 20.04 需要添加 i386 架构,然后才能安装 i386 库。

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
于 2021-08-28T07:57:00.303 回答