Homebrew is a popular framework for quickly installing development tools on MacOS, including Gfortran. MacOS cloud services such as MacInCloud may say they provide Homebrew, but you may not be able to install packages without a sudo/admin account. To install Homebrew without sudo/admin in the user home directory for cloud or physical Mac hardware, follow these steps:
mkdir homebrew && curl -L https://github.com/Homebrew/brew/tarball/master | tar xz --strip 1 -C homebrew
Edit ~/.profile to include
Open a new Terminal to use Homebrew.
May need to compile GCC
If one truly doesn’t have sudo/admin access as typical with a managed (less-expensive) cloud MacOS plan, and if XCode is not the appropriate version, GCC may compile from source, which can take about an hour on a modern quad-core Mac. This may occur when doing
brew install gcc
- Homebrew without sudo script