Hello I am attempting to install a package from source that requires fortran. I have managed to download gofortran but it is in /usr/local/gfortran and thus gives me the error: make: /usr/local/gfortran: Permission denied
I usually turn to Homebrew any time OSx is lacking in the compiler or library department. It will install in a location where you have write permissions and link as needed.
You'll find a fair amount of Apple I did it my way in R packages that need compilation but fail with "Error: non-zero exit status." Often, for common packages, Saint Simon Urbanek on the Core R Team will make the required changes and upload a binary version that requires no user tears. If it's going to happen, it usually will within about a month of a new or updated release.
An alternative is to retry with sudo since the directory is owned by root in the admin group.