gpt4 book ai didi

c++ - 安装 GCC : fatal error: gnu/stubs-32. h: 没有那个文件或目录

转载 作者:行者123 更新时间:2023-11-28 05:16:11 28 4
gpt4 key购买 nike

我正在使用装有 Centos 6.6 的服务器。我没有 root 访问权限,我想将 gcc-4.8.1 安装到我自己的目录中。我找到了解决方案并运行了以下命令:

wget http://www.netgull.com/gcc/releases/gcc-4.8.1/gcc-4.8.1.tar.gz
tar zxvf gcc-4.8.1.tar.gz
cd gcc-4.8.1
./contrib/download_prerequisites
cd ..
mkdir objdir
cd objdir
$PWD/../gcc-4.8.1/configure --prefix=$HOME/gcc-4.8.1 --enable-languages=c,c++,fortran,go
make

我在运行 make 命令时遇到错误。它报告以下信息:

configure: error: `CC' has changed since the previous run:
configure: former value: `/home/mypath/software/try_gcc2/objdir/./gcc/xgcc -B/home/mypath/software/try_gcc2/objdir/./gcc/ -B/home/mypath/software/try_gcc2/installed/x86_64-unknown-linux-gnu/bin/ -B/home/mypath/software/try_gcc2/installed/x86_64-unknown-linux-gnu/lib/ -isystem /home/mypath/software/try_gcc2/installed/x86_64-unknown-linux-gnu/include -isystem /home/mypath/software/try_gcc2/installed/x86_64-unknown-linux-gnu/sys-include '
configure: current value: `/home/mypath/software/try_gcc2/objdir/./gcc/xgcc -B/home/mypath/software/try_gcc2/objdir/./gcc/ -B/home/mypath/gcc-4.8.1/x86_64-unknown-linux-gnu/bin/ -B/home/mypath/gcc-4.8.1/x86_64-unknown-linux-gnu/lib/ -isystem /home/mypath/gcc-4.8.1/x86_64-unknown-linux-gnu/include -isystem /home/mypath/gcc-4.8.1/x86_64-unknown-linux-gnu/sys-include '
configure: error: in `/home/mypath/software/try_gcc2/objdir/x86_64-unknown-linux-gnu/libgcc':
configure: error: changes in the environment can compromise the build
configure: error: run `make distclean' and/or `rm ./config.cache' and start over
make[2]: *** [configure-stage1-target-libgcc] Error 1
make[2]: Leaving directory `/home/mypath/software/try_gcc2/objdir'
make[1]: *** [stage1-bubble] Error 2
make[1]: Leaving directory `/home/mypath/software/try_gcc2/objdir'
make: *** [all] Error 2

我不知道我的命令有什么问题。谢谢大家帮助我!!!

最佳答案

我想我已经找到了解决方案。当我尝试构建 gcc-5.2.0 时,它报告说我的服务器没有 32 位库。它还通知如果我仍然想安装,我可以在构建时添加 --disable-multilib 。我试过了,现在构建正常运行。

关于c++ - 安装 GCC : fatal error: gnu/stubs-32. h: 没有那个文件或目录,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42594620/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com