安装glibc-devel.i686后没有32开发库错误


11

我试图在CentOS 6安装gcc 4.9.0在./configure有来了一个错误:

/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-redhat-linux/4.4.7/libgcc_s.so when searching for -lgcc_s
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-redhat-   linux/4.4.7/libgcc_s.so when searching for -lgcc_s
/usr/bin/ld: cannot find -lgcc_s
collect2: ld returned 1 exit status
configure: error: I suspect your system does not have 32-bit developement libraries (libc and headers). If you have them, rerun configure with --enable-multilib. If you do not have them, and want to build a 64-bit-only compiler, rerun configure with --disable-multilib.

我搜索了一个答案,发现应该通过安装glibc-devel.i686软件包来解决此错误。

但是,即使使用安装了相同的错误,该错误仍然存​​在yum。有任何想法吗?

Answers:


10

要比@Miroslav答案更明确:

1 依赖项

#64-bit (`x86_64`) C library and headers
yum install libgcc
yum install glibc-devel

# 32-bit (‘i386’) C library and headers
yum install libgcc.i686
yum install glibc-devel.i686

GCC Prerequesites中查看所有内容

2 然后用 --enable-multilib

../configure --enable-languages=all --prefix=/usr/local/gcc --enable-multilib

编辑。

旁注:不要在同一目录中编译,正如./configure您在示例中看到的那样。请参阅安装GCC

不要运行./configure,这不受支持,您需要从源目录外部运行configure


By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.