How do I install multiple versions of gcc?


(Prebys) #1

I’m a HomeBrew novice.

I have the latest version of gcc (8.2.0), but I have a particular software package that has to
be compiled with version 7.3 (actually with gfortran 7.3).

Is it possible to install the older version of gcc/gfortran and switch to that for this compilation? and
if so, can someone walk me through the steps?

Thanks


(Sean Molenaar) #2

If there’s a package (eg gcc@7) for it you can just brew install and brew link that one. If there isn’t I’m afraid you’ll have to jump some more hoops.