在OSX 10.10上安装GCC 4.4.7

时间:2022-10-07 06:37:21

I already have gcc version 6.1.0 installed on my computer thanks to XCode:

由于XCode,我已经在我的计算机上安装了gcc版本6.1.0:

Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 6.1.0 (clang-602.0.53) (based on LLVM 3.6.0svn)
Target: x86_64-apple-darwin15.0.0
Thread model: posix

But I need to install gcc version 4.4.7 and I have tried doing things like brew install gcc447 and such but it always says package not found. Is there a way to install gcc 4.4.7 on OSX 10.10 and have it run as "gcc4" or a similar alias while still keeping the XCode 6.1.0 version?

但是我需要安装gcc版本4.4.7并且我已经尝试过像brew install gcc447之类的东西,但它总是说找不到包。有没有办法在OSX 10.10上安装gcc 4.4.7并让它以“gcc4”或类似的别名运行,同时仍保留XCode 6.1.0版本?

1 个解决方案

#1


2  

Homebrew doesn't have recipes for every individual minor version of GCC, only for the major versions like 4.4. Conveniently, though, 4.4.7 is the most recent version of GCC 4.4, so you're fine.

Homebrew没有针对GCC的每个小版本的配方,仅适用于4.4等主要版本。不过,方便的是,4.4.7是GCC 4.4的最新版本,所以你很好。

Run brew install gcc44; the compiler will be installed as gcc-4.4.

运行brew install gcc44;编译器将作为gcc-4.4安装。

#1


2  

Homebrew doesn't have recipes for every individual minor version of GCC, only for the major versions like 4.4. Conveniently, though, 4.4.7 is the most recent version of GCC 4.4, so you're fine.

Homebrew没有针对GCC的每个小版本的配方,仅适用于4.4等主要版本。不过,方便的是,4.4.7是GCC 4.4的最新版本,所以你很好。

Run brew install gcc44; the compiler will be installed as gcc-4.4.

运行brew install gcc44;编译器将作为gcc-4.4安装。