Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error with Matrix, nlme and other 🤷🏻‍♂️ #2075

Open
MarcellGranat opened this issue Jan 14, 2025 · 2 comments
Open

Error with Matrix, nlme and other 🤷🏻‍♂️ #2075

MarcellGranat opened this issue Jan 14, 2025 · 2 comments

Comments

@MarcellGranat
Copy link

Hi, 👋

I am facing the following issue since I started to use Mac M1.

renv::restore()

Error:
! Error installing package 'nlme':

  • installing source package ‘nlme’ ...
    ** package ‘nlme’ successfully unpacked and MD5 sums checked
    ** using staged installation
    ** libs
    using C compiler: ‘Apple clang version 16.0.0 (clang-1600.0.26.4)’
    sh: /opt/gfortran/bin/gfortran: No such file or directory
    using SDK: ‘’
    /opt/gfortran/bin/gfortran -arch arm64 -fPIC -Wall -g -O2 -c chol.f -o chol.o
    make: /opt/gfortran/bin/gfortran: No such file or directory
    make: *** [chol.o] Error 1
    ERROR: compilation failed for package ‘nlme’
  • removing ‘/Users/marci/projects/rf/danone_kpi/renv/staging/4/nlme’

R was unable to find the gfortran binary.
gfortran is required for the compilation of FORTRAN source files.

Please check that gfortran is installed and available on the PATH.
Please see https://stackoverflow.com/q/35999874 for more information.

Reason(s):

  • 'sh: /opt/gfortran/bin/gfortran: No such file or directory'
  • 'make: /opt/gfortran/bin/gfortran: No such file or directory'
    install of package 'nlme' failed [error code 1]
    Show Traceback

Sorry to post, but I could not find any working solution in other posts.

R version 4.4.2 (2024-10-31)
Platform: aarch64-apple-darwin20
Running under: macOS Sequoia 15.2

@kevinushey
Copy link
Collaborator

You'll need to download gfortran -- e.g. from

https://mac.r-project.org/tools/
https://mac.r-project.org/tools/gfortran-12.2-universal.pkg

@MarcellGranat
Copy link
Author

That's just genius! 🥳

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants