缺少 libstdc++.a

lms*_*asu 1 ubuntu makefile

我正在使用 Ubuntu 8.04 / 32 位(作为虚拟机)。在对非 min 的项目执行某些 make 时,我收到错误消息:

g++: /usr/lib/libstdc++.a: 没有那个文件或目录

我该怎么办?gcc 包是通过突触安装的,我想念什么?

谢谢,卢西安

Phi*_*lds 5

对于 Ubuntu 8.04(又名 hardy),您需要安装 libstdc++6-4.2-dbg 包。

$ sudo aptitude install libstdc++6-4.2-dbg
Run Code Online (Sandbox Code Playgroud)

如果以后需要查找此类文件,请安装 apt-file(如果尚未安装)并使用 apt-file 搜索。

$ sudo aptitude install apt-file
...
$ sudo apt-file search /usr/lib/libstdc++.a
Run Code Online (Sandbox Code Playgroud)

  • 这并不完全正确 (1) 他需要 -dev 包,而不是 -dbg (2) 运行 apt-file 时不需要 sudo (3) -4.2- 是他的 g++ 版本,所以如果他使用 g++ 4.3,他需要 libstdc++6-4.3-dev (2认同)