64位linux提示gnu/stubs-32.h:No such file or directory
来源:互联网 发布:yum nginx 安装 编辑:程序博客网 时间:2024/05/19 20:01
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
Are you using Ubuntu 12.04? There is a known problem that puts the files in a non standard location. You'll also need to do:
export LIBRARY_PATH=/usr/lib/$(gcc -print-multiarch)export C_INCLUDE_PATH=/usr/include/$(gcc -print-multiarch)export CPLUS_INCLUDE_PATH=/usr/include/$(gcc -print-multiarch)
somewhere before you build (say in your .bashrc).
If you are also compiling C++ code, you will also need the 32 bit stdc++ library. If you see this warning:
.... /usr/bin/ld: cannot find -lstdc++ ....
On Ubuntu you will need to do sudo apt-get install g++-multilib
On CentOS 5 you will need to do yum install libstdc++-devel.i386
On CentOS 6 you will need to do yum install libstdc++-devel.i686