brew install gcc too time consuming

GccHomebrew

Gcc Problem Overview


I'm doing a clean install of Mavericks, and accidentally did

brew install gcc

which is taking over half an hour, maybe more. Should I terminate it? I know now that I should have installed a specific gcc (maybe gcc48) but it's too late and my macbook air is breathing hard.

Currently done downloading all 5 dependencies, but stuck on the "Installing gcc" part. It's downloaded a gcc-4.9.1.tar.bz2, configured and built it, and is stuck on making the bootstrap.

Any advice is appreciated.

This was good advice I saw too late: https://apple.stackexchange.com/questions/38222/how-do-i-install-gcc-via-homebrew

Asked here first: https://superuser.com/questions/788256/brew-install-gcc-mac-os-10-9-mavericks

Gcc Solutions


Solution 1 - Gcc

You do need gcc installed to get gfortran, and you do need a fortran compiler for scipy. Homebrew will install a "bottled" (i.e., precompiled) version of the gcc package, which is very fast, if you have the Xcode Command Line Tools installed. These are separate from XCode proper. You can install them with xcode-select --install.

There is no particular need to install a particular version of gcc (and I think those may not be bottled, so they will be equally slow).

In general, interrupting Homebrew with Ctrl+C is safe and Homebrew will automatically recover.

You may be interested in the homebrew-python tap.

Solution 2 - Gcc

Try this to force the bottle (pre-compiled) installation

brew install gcc --force-bottle

Solution 3 - Gcc

patience a one-word answer... Launch this thing overnight, or budget the time.
Just ran an update on 10.20_4 for a ... 322 minutes wait. That's about 5.5 hours.

Oh, and disk space on your system partition needs > 10GB free.

🍺  /usr/local/Cellar/gcc/10.2.0_4: 1,467 files, 331.8MB, built in 130 minutes 33 seconds
🍺  /usr/local/Cellar/openblas/0.3.15: 23 files, 120.3MB, built in 19 minutes 28 seconds
🍺  /usr/local/Cellar/hdf5/1.12.0_3: 268 files, 16.4MB, built in 5 minutes 5 seconds
🍺  /usr/local/Cellar/netcdf/4.8.0: 95 files, 6.5MB, built in 5 minutes 54 seconds
🍺  /usr/local/Cellar/cython/0.29.23: 440 files, 8.9MB, built in 1 minute 2 seconds
🍺  /usr/local/Cellar/numpy/1.20.2: 1,005 files, 24.3MB, built in 2 minutes 15 seconds
🍺  /usr/local/Cellar/doxygen/1.9.1: 9 files, 15.5MB, built in 1 minute 54 seconds
🍺  /usr/local/Cellar/little-cms2/2.12: 21 files, 1MB, built in 27 seconds
🍺  /usr/local/Cellar/openjpeg/2.4.0: 522 files, 13.1MB, built in 25 seconds
🍺  /usr/local/Cellar/nspr/4.30: 86 files, 1.1MB, built in 24 seconds
🍺  /usr/local/Cellar/nss/3.64: 224 files, 42.4MB, built in 16 minutes 14 seconds
🍺  /usr/local/Cellar/qt@5/5.15.2: 10,384 files, 190.2MB, built in 64 minutes 4 seconds
🍺  /usr/local/Cellar/poppler/21.05.0: 476 files, 26MB, built in 3 minutes 55 seconds
🍺  /usr/local/Cellar/unixodbc/2.3.9_1: 44 files, 1.9MB, built in 1 minute 16 seconds
🍺  /usr/local/Cellar/webp/1.2.0: 39 files, 2.2MB, built in 41 seconds
🍺  /usr/local/Cellar/zstd/1.4.9_1: 31 files, 2.6MB, built in 31 seconds
🍺  /usr/local/Cellar/gdal/3.2.2_4: 329 files, 59.7MB, built in 17 minutes 26 seconds

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionehacinomView Question on Stackoverflow
Solution 1 - GccTim SmithView Answer on Stackoverflow
Solution 2 - GccChristophe MaroisView Answer on Stackoverflow
Solution 3 - GccJeromeView Answer on Stackoverflow