3

I need a C compiler and gofrortran to install a package. I was able to get the c complier with:

xcode-select --install

Unfortunately I am having trouble getting a working fortran complier. I know that I should be able to download one here:

https://cran.r-project.org/bin/macosx/tools/

Any advice?

Update I attempted downloading from HPC and received the following error while untaring:

x usr/local/: Can't set user=0/group=0 for usr/localFailed to set file flags
x usr/local/bin/
x usr/local/.com.apple.installer.keep
x usr/local/libexec/
x usr/local/include/
x usr/local/lib/
x usr/local/share/
x usr/local/share/man/
x usr/local/share/locale/
......    
x usr/local/libexec/gcc/x86_64-apple-darwin17.5.0/7.3.0/plugin/gengtype
x usr/local/bin/gcov
x usr/local/bin/g++
x usr/local/bin/gfortran
x usr/local/bin/gcc-ranlib
x usr/local/bin/gcov-tool
x usr/local/bin/gcc-nm
x usr/local/bin/gcc-ar
x usr/local/bin/gcc
x usr/local/bin/gcov-dump
x usr/local/bin/cpp
tar: Error exit delayed from previous errors.
1

Install homebrew from brew.sh and then install gcc using brew. The gcc package contains gfortran. This is a documented and verified process. Brew will also let you know if you have mangled permissions, missing path variables or are using sudo where you shouldn’t.

| improve this answer | |
2

Yea that has always been a difficult task but I would recommend gfortran. Its part of the GCC package from gnu. It's a nice Fortran compiler and the best part is it is free. If you've searched the web you know most Fortran compilers are pricey. The link above will let you access precompiled binaries for gfortran. The binaries are packaged as simple to install Mac .dmg files.

The version for Sierra is 6.3 while the latest version for Mojave is 8.2.

| improve this answer | |
  • I tried the HPC version and ran into the following issue when I tried to untar: x usr/local/: Can't set user=0/group=0 for usr/localFailed to set file flags x usr/local/bin/ x usr/local/.com.apple.installer.keep x usr/local/libexec/ ... tar: Error exit delayed from previous errors. – Connorr.0 Nov 6 '19 at 1:23

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .