How to install gfortran 8 on macos with brew?!

homebrew

#1

All,

I’m a bit baffled. I have a travis run I’d like to do in osx with gfortran 8.2.0. So I have in my .travis.yml:

      - os: osx
        osx_image: xcode10.1
        addons:
           homebrew:
             update: true
             packages:
               - gcc
               - cmake
               - htop
        env:
           - FC='/usr/local/bin/gfortran'
           - USE_MPI=NO

But, when it gets to the brew step:
Skipping install of gcc formula. It is already up-to-date.

Using gcc

But gfortran is not in /usr/local/bin!

Is there something I’m missing?


#2

I think I’ve figured it out. I need to run brew link gcc in before_install to have gfortran to exist as a link in /usr/local/bin.