The current version of GCC on my mac is 9.3.0, and the latest version is 10.2 now. I want to update GCC to the latest version via Homebrew. How can I do that?
How to update GCC version via Homebrew
gcchomebrewterminal
Related Question
- Use specific local gcc and related libraries with Homebrew
- Homebrew: how to switch between GCC versions `gcc49` and `gcc`
- “Failure while executing” error when trying to install GCC
- MacOS – homebrew gcc-5 fails to find any standard library
- Installed gcc with Homebrew, now how to use that gcc instead of clang
- How to update a command-line program using Homebrew
- How to update Ruby from the default version to 2.1.6 via terminal
- Ld linker is missing when installing gcc using Homebrew on Mac OS
Best Answer
The standard command
brew upgrade gcc
should work. The formula forgcc
points to the latest version. You can also install a specific version, ex.brew install gcc@10
.If you installed Xcode and/or the Command Line Tools, it ships with its own
gcc
.That's the same output as
As with most Homebrew installations, Homebrew's
gcc
is in the Cellar: