Mac OS X R error “ld: warning: directory not found for option”

前端 未结 7 1480
梦毁少年i
梦毁少年i 2020-12-01 04:38

I am trying to install an R package from source, but getting an error:

* installing *source* package ‘mclust’ ...
** package ‘mclust’ successfully unpacked a         


        
7条回答
  •  借酒劲吻你
    2020-12-01 05:21

    I'm working on MacOS Mojave (10.14.5) and on R 4.0.0. The problem here is that "CRAN R 4.0.0 builds and higher no longer use any custom compilers" (see here), so the Makevars solution does not appear to work anymore.

    The solution for me was to download and install the GNU Fortran compiler from the official R-Project website. Note that you will also need Xcode and Xcode command-line tools.

    After running the installer with default settings, compilation of gfortran code worked without problems.

提交回复
热议问题