解决 fatal error: bits/libc-header-start.h:no such file

保留现场

想要分别编译 32 位和 64 位的程序时,gcc 出现了错误,

In file included from func_call.c:1:
/usr/include/stdio.h:27:10: fatal error: bits/libc-header-start.h: 没有那个文件或目录
   27 | #include <bits/libc-header-start.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.

问题解决

问题原因猜测是默认 gcc 只提供当前机器的版本,解决如下

apt install gcc-multilib