Macos 在OS X上安装GCC 4.7.1
我正试图在Mac上安装Macos 在OS X上安装GCC 4.7.1,macos,shell,gcc,installation,gnu,Macos,Shell,Gcc,Installation,Gnu,我正试图在Mac上安装GCC4.7.1,因为我想更新XCode中给出的LLVM GCC4.2 我已经下载了GCC4.7.1,并将GCC-4.7.1文件夹放在~/Downloads中,然后我按照这里给出的说明进行了操作:我写了 cd ~/Desktop mkdir objdir cd objdir ~/Downloads/gcc-4.7.1/configure --with-gmp=/usr/local/include --with-mpfr=/usr/local/include --with-m
GCC
4.7.1,因为我想更新XCode中给出的LLVM GCC
4.2
我已经下载了GCC
4.7.1,并将GCC-4.7.1
文件夹放在~/Downloads
中,然后我按照这里给出的说明进行了操作:我写了
cd ~/Desktop
mkdir objdir
cd objdir
~/Downloads/gcc-4.7.1/configure --with-gmp=/usr/local/include --with-mpfr=/usr/local/include --with-mpc=/usr/local/include
配置确实显示出问题
然后我写了
make
在我得到这个信息之前一切都很顺利
rm -f stage_current
Comparing stages 2 and 3
warning: gcc/cc1-checksum.o differs
warning: gcc/cc1obj-checksum.o differs
warning: gcc/cc1plus-checksum.o differs
Bootstrap comparison failure!
gcc/intl.o differs
make[2]: *** [compare] Error 1
make[1]: *** [stage3-bubble] Error 2
make: *** [all] Error 2
/bin/sh: line 0: cd: ./fixincludes: No such file or directory
make[1]: *** [check-fixincludes] Error 1
make: *** [do-check] Error 2
然后,makecheck
给我这个消息
rm -f stage_current
Comparing stages 2 and 3
warning: gcc/cc1-checksum.o differs
warning: gcc/cc1obj-checksum.o differs
warning: gcc/cc1plus-checksum.o differs
Bootstrap comparison failure!
gcc/intl.o differs
make[2]: *** [compare] Error 1
make[1]: *** [stage3-bubble] Error 2
make: *** [all] Error 2
/bin/sh: line 0: cd: ./fixincludes: No such file or directory
make[1]: *** [check-fixincludes] Error 1
make: *** [do-check] Error 2
以及makeinstall
此消息
/bin/sh /Users/fpiro07/Downloads/gcc-4.7.1/mkinstalldirs /usr/local /usr/local
/bin/sh: line 0: cd: ./fixincludes: No such file or directory
make[1]: *** [install-fixincludes] Error 1
make: *** [install] Error 2
如何解决这些问题并安装我的GCC
4.7.1?安装并运行:
它将负责正确配置和安装gcc(编写本文时为4.7.2)和所有依赖项。不起作用。我已经下载了.pkg文件并通过双击安装了它。之后,我在我的终端中输入了‘sudo-port-selfupdate’,上面写着‘sudo:port:command-not-found’。好的,所以你需要在安装macports后重新启动终端!但它仍然不起作用,因为当我进入g++--版本时,我看到我仍然处于版本4.2.1!您需要检查
/opt/local/bin
是否位于$PATH
中。有关详细信息,请查看macports文档。