Cannot install gcc with brew

Hi there,

since i need it for my work i installed gcc with the command brew install gcc, but it displayed to me an error about the postinstall of gcc:

==> Installing gcc
==> Pouring gcc--15.1.0.x86_64_linux.bottle.tar.gz
Warning: The post-install step did not complete successfully
You can try again using:
  brew postinstall gcc
==> Summary
🍺  /home/linuxbrew/.linuxbrew/Cellar/gcc/15.1.0: 2,153 files, 606.7MB
==> Running `brew cleanup gcc`...
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).

Looking on the web i’ve found some github issue that talked about the package build-essential that needs to be installed with apt/dnf…

Thank you in advance

What happens when you do this?

Hi jorge,
It repeat the same exatly error.
I’ve also tryed to dobrew update wich said that is up to date and also brew doctor that warned me the missing of Clang : for install it do brew install gcc

I dunno if it will be helpfull or not but searching online this is only what i foud: brew install gcc: The post-install step did not complete successfully · Homebrew · Discussion #3030 · GitHub

(this talks about the missing library build-essential that needs to be installed on normal system with apt/dnf)

Thanks once again for your help

This is probably not the route you want to go, but for my purposes I solved my gcc, gcc-c++, gcc-gfortran issues by daily building my own image using the Blue-Build template (I tried the uBlue template, but it would typically fail due to lack of build space). If it helps, my recipe files are at GitHub - whelanh/myBluefin

If you are on bluefin you should have gcc on image. This is required for brew.

Are you on Aurora?

Thanks, for now my workaround is installing gcc on an arch container thanks to distrobox and for what i saw it works.
Only i cannot understand why gcc is not preinstalled on Aurora instead of Bluefin and also why i have this post install error on brew.

Hi Giles,
Yes I am on Aurora so no gcc preinstalled here for what i saw

They are gonna add it back. It was removed by mistake not realizing it was needed for brew.

I’m glad to hear that, thanks

Yup, it’s fixed here: fix(ublue-brew): add gcc to requires by ledif · Pull Request #672 · ublue-os/packages · GitHub

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.