我正在尝试在 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.
Run Code Online (Sandbox Code Playgroud)
我搜索了一个答案,发现这个错误应该通过安装glibc-devel.i686
包来解决。
但是,即使我使用yum
. 有任何想法吗?
小智 11
比@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
Run Code Online (Sandbox Code Playgroud)
在GCC Prerequesites 中查看所有这些。
2 然后编译 --enable-multilib
../configure --enable-languages=all --prefix=/usr/local/gcc --enable-multilib
Run Code Online (Sandbox Code Playgroud)
旁注:不要在同一目录中编译,正如我./configure
在您的示例中看到的那样。请参阅安装 GCC
不要运行./configure,这是不支持的,你需要从源目录之外运行configure
归档时间: |
|
查看次数: |
13583 次 |
最近记录: |