系统环境 centos6.3 , 编译环境gcc 4.4.6
将系统从32位centos迁移到64位持续集成平台上时,编译报错:
gnu/stubs-32.h: No such file or directory
google了下原来是32位glibc库没装:
yum install glibc-devel.i686 -y
安装完成之后又有问题了:
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-redhat-linux/4.4.6/libstdc++.so when searching for -lstdc++
...
...
原因是glibc++ 32位库没有
安装:yum install glibc++-devel.i686 -y
搞定!!
ps:32位库的名称和操作系统及其 版本有关系,这里方法只限于centos 6.3 g++ 4.4.6
You're missing the 32 bit libc dev package:
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.3, the package name is glibc-devel.i686.
On SLES it's called glibc-devel-32bit - do zypper in glibc-devel-32bit
阅读(2904) | 评论(0) | 转发(0) |