How to install a FORTRAN compiler on macOS?
6,056
Instead of trying to install gfortran you should try gcc instead. gcc install comes with gfortran. This is available from homebrew or MacPorts.
Another method is to install pre-compiled binaries from here. Select the version based on your Mac OS version and you get an apple style loader. A .dmg file ready to load on your mac.
Related videos on Youtube
Author by
shere
Updated on September 18, 2022Comments
-
shere almost 2 years
I am trying to install a Fortran compiler on my Mac Pro 2019 (running macOS). First step is:
sudo apt-get install gfortran
but I get error:
command not found
I also tried
brew install gfortran
also
port install gfortran
but again, the same error.
-
Nasir Riley almost 5 yearsFirst,
apt-get
is for Debian/Ubuntu/Mint and derivatives and not MacOS. To usebrew
orport
, you'll need to install them as they are third-party tools and don't come with MacOS. The instructions for installingbrew
are here: brew.sh and the instructions for installingport
are here: guide.macports.org/chunked/installing.macports.html
-