您的位置:首页 > 运维架构 > Linux

64位linux提示gnu/stubs-32.h:No such file or directory

2017-12-26 13:55 681 查看
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
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐