2

I am having issues in installing the samr package in R v3.4 MacOS sierra. I get this warning message:

  "Package which is only available in source form, and may need compilation of
   C/C++/Fortran: ‘samr’
 Do you want to attempt to install these from sources?
 y/n: y
 installing the source package ‘samr’

trying URL 'https://cran.rstudio.com/src/contrib/samr_2.0.tar.gz'
Content type 'application/x-gzip' length 36702 bytes (35 KB)
==================================================
downloaded 35 KB

* installing *source* package ‘samr’ ...
** libs
gfortran   -fPIC  -g -O2  -c rankcol.f -o rankcol.o
make: gfortran: No such file or directory
make: *** [rankcol.o] Error 1
ERROR: compilation failed for package ‘samr’
* removing ‘/Library/Frameworks/R.framework/Versions/3.4/Resources/library/samr’
Warning in install.packages :
  installation of package ‘samr’ had non-zero exit status

Does anybody has an idea to overcome this?

gung - Reinstate Monica
  • 11,583
  • 7
  • 60
  • 79
Tommy
  • 31
  • 2
  • This means that you need gfortran compiler. – Consistency May 28 '17 at 14:31
  • You could try: https://gcc.gnu.org/wiki/GFortranBinaries – Consistency May 28 '17 at 14:33
  • See: https://cran.r-project.org/bin/macosx/tools/ – MrFlick May 28 '17 at 14:38
  • It's a good idea to get gfortran directly from CRAN (see above), because each version of R is built to work with a particular version of gfortran (which is usually not the newest one included with gcc). Using other versions is a common source of more confusing package installation bugs. – alistaire May 28 '17 at 17:33

1 Answers1

1

Thanks so much, I dwonloaded gofortran for macOs sierra https://gcc.gnu.org/wiki/GFortranBinaries#MacOS and it seems to work now

Tommy
  • 31
  • 2