fatal error: gnu/stubs-32.h: No such file or directory

1.ubuntu 64位主机上编译32位应用.编译出现以下错误

/usr/include/gnu/stubs.h:7:27: fatal error: gnu/stubs-32.h: No such file or directory compilation terminated. make: *** [bitmap.o] Error 1

这意味着你的pc缺失了32位的libc库,那么安装

  sudo apt-get install libc6-dev-i386

 

记录:

 

On Ubuntu it's called libc6-dev-i386 - do sudo apt-get install libc6-dev-i386. See below for extra instructions for Ubuntu 12.04.

On Red Hat distros, the package name is glibc-devel.i686 (Thanks to David Gardner's comment)

On CentOS 5.8, the package name is glibc-devel.i386 (Thanks to JimKleck's comment)

On CentOS 6 / 7, the package name is glibc-devel.i686.

On SLES it's called glibc-devel-32bit - do zypper in glibc-devel-32bit

On Gentoo it's called sys-libs/glibc - do emerge -1a sys-libs/gcc [source] (Note : One may use equery to confirm this is correct; do equery belongs belongs /usr/include/gnu/stubs-32.h)

链接原地址:stubs-32 缺失

你可能感兴趣的:(GCC/C/C++,stubs-32.h,缺失,stubs-32.h,No,such,file)