Brew Gfortran



After some years as a MacPorts user I decided to give home brew a try, which are advertising their package manager with the sentence “Homebrew — MacPorts driving you to drink? Try Homebrew!”. The idea is not to build everything from scratch and create another software micro cosmos but to reuse existing Mac OS X abilities and save some space (as well as [cpu] time for updates). Sounds promising I thought and installed it according to the website’s description.

Use brew options.On my machine I get this: brew options gcc48 -enable-all-languages Enable all compilers and languages, except Ada -enable-cxx Build the g compiler -enable-fortran Build the gfortran compiler -enable-java Buld the gcj compiler -enable-multilib Build with multilib support -enable-nls Build with native language support (localization) -enable-objc Enable Objective-C. Brew install gfortran. Brew would complain otherwise that no fortran compiler is installed and R installation would fail. After that, everything is ready already and we can proceed using: brew install R. You need to run this command first if you are on a recent OS X: brew tap homebrew/science.

One of the first things I wanted to install was “The R Project for Statistical Computing”. Anyhow, since home brew requires people to think a bit, it was not as straight forward as some MacPorts rules.For R, we need to have a fortran compiler installed. I did this using the following command:

Brew Gfortran

Gfortran

Brew would complain otherwise that no fortran compiler is installed and R installation would fail. After that, everything is ready already and we can proceed using:

NB! You need to run this command first if you are on a recent OS X:

Osx Brew Gfortran

Brew

That’s it - no rocket science but nice to know in advance…
Cheers,
iss

Brew gfortranLink

Brew Install Gfortran-9

View the discussion thread.





Comments are closed.