centos gnu/stubs-32.h:没有那个文件或目录

在Centos64位机器上,使用“gcc -m32”编译32位程序时,提示如下错误:
在包含自 /usr/include/features.h:385 的文件中,
                 从 /usr/include/stdio.h:28,
                 从 lex.yy.cpp:20:
/usr/include/gnu/stubs.h:7:27: 错误:gnu/stubs-32.h:没有那个文件或目录
make: *** [lex.yy.32.g.o] Error 1

You need to install the glibc-devel package. It contains the object files necessary for developing programs which use the standard C libraries (which are used by nearly all programs). If you are developing programs which will use the standard C libraries, your system needs to have these standard object files available in order to create the executables.

根据如上对错误原因的描述,我们只需按照对应系统类型,使用不同的方法安装“glibc-devel”包即可。
针对centos而言:
Fix for the RHEL/CentOS 5.x for GCC gnu/stub-32.h missing error

Type the following yum command:
# yum -y install glibc-devel.i386

Fix for the RHEL/CentOS 6.x for GCC gnu/stub-32.h missing error

Type the following yum command:
# yum -y install glibc-devel.i686 glibc-devel

yum -y install glibc-devel.i686 glibc-devel

参考: http://www.cyberciti.biz/faq/x86_64-linux-error-gnustub-32h-missing-error-and-solution/

转载于:https://www.cnblogs.com/motadou/archive/2009/11/14/1603159.html

  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值