nm:尽管已安装最新的binutils Ubuntu 20.04,但未找到命令

我正在尝试从源代码构建GCC,当我尝试使用./configure --prefix=/tmp/gcc配置gmp 4.3.2时,出现以下错误消息

checking if globals are prefixed by underscore... ./configure: line 30083: nm: command not found
unknown
configure: WARNING: +----------------------------------------------------------
configure: WARNING: | Cannot determine global symbol prefix.
configure: WARNING: | nm output doesn't contain a global data symbol.
configure: WARNING: | Will proceed with no underscore.
configure: WARNING: | If this is wrong then you'll get link errors referring
configure: WARNING: | to ___gmpn_add_n (note three underscores).
configure: WARNING: | In this case do a fresh build with an override,configure: WARNING: |     ./configure gmp_cv_asm_underscore=yes
configure: WARNING: +----------------------------------------------------------
checking how to switch to read-only data section...     .section        .rodata
checking for assembler .type directive... .type $1,@$2
checking for assembler .size directive... .size $1,$2
checking for assembler local label prefix... configure: WARNING: "nm" failure
configure: WARNING: cannot determine local label,using default L
L
checking for assembler byte directive... .byte
checking how to define a 32-bit word... ./configure: line 30423: nm: command not found
./configure: line 30423: nm: command not found
configure: error: cannot determine how to define a 32-bit word

我已经安装了binutils-2.34-6ubuntu1,我在网上找到了命令nm所在的位置,但是我无法通过which命令找到它。如果还有其他信息需要解决此问题,请告诉我。

谢谢您的帮助。

eejander2 回答:nm:尽管已安装最新的binutils Ubuntu 20.04,但未找到命令

sudo apt-get install --reinstall binutils解决了这个问题。

本文链接:https://www.f2er.com/1233677.html

大家都在问