Open leoguelman opened 3 years ago
I think the answers here:
may be helpful.
I've tried following the answers from stack overflow and the only thing that solved was to run R
as sudo
.
sudo R
then:
install.packages(c("StanHeaders", "Stan"))
Please note that all subsequent models that you sample using rstan
must be run from a sudo R
session.
One way to get around this is to use cmdstanr
. I compile the model using a sudo R
session and then give permission to my user using sudo chown -R $(whoami) .cmdstanr
.
If somebody knows how to deal with the damned <cmath>
header problem in MacOS please let me know. All solutions from the stack overflow link was to no avail.
did anyone have any luck? I am having the same problem after updating to Big Sur. I tried the suggested solutions and no luck.
My Configuration just in case: macOS Big Sur Version 11.2.3
R version 4.0.5 (2021-03-31)
GNU Fortran (GCC) 8.2.0
Apple clang version 12.0.0 (clang-1200.0.32.29) Target: x86_64-apple-darwin20.3.0 Thread model: posix InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
@leoguelman In case you (or anyone else who is getting this error) have not yet solved it. What worked for me was uninstalling the command line tools >sudo rm -rf /Library/Developer/CommandLineTools and the Xcode app. I then re-installed the xcode app and did NOT install the command line tools > xcode-select --install . I think something in the app was getting overwritten when running the > xcode-select --install command as the command line tools are already pre-installed in the new versions of the xcode app.
@LeonardoGFernandes Thank you so much for the solution!!! I have the same configuration as yours. It took me six hours struggling in the installation error until I saw your post. One thing to add if anyone has the same situation: remember to run >xcode-select --switch path/to/Xcode.app in your terminal after installing Xcode app. I wasn't reading the warning message carefully so the path switching confused me for a while.
Again, thank you!!!
did anyone have any luck? I am having the same problem after updating to Big Sur. I tried the suggested solutions and no luck.
My Configuration just in case: macOS Big Sur Version 11.2.3
R version 4.0.5 (2021-03-31)
GNU Fortran (GCC) 8.2.0
Apple clang version 12.0.0 (clang-1200.0.32.29) Target: x86_64-apple-darwin20.3.0 Thread model: posix InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
i dont have xcode installed, as it was consuming around 30Gb of storage, i deleted it as i dont use it, but now whatever video/issue i read for installing "bits/stdc++.h" are solving via "> InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin" this directory, and this doesnt exists for me, what should i do?
FWIW, Xcode contains a lot of stuff for iOS development, including a simulator. All that is cruddy bloatware if you don't use it, but it can be deleted. IIRC (I did this years ago) it takes a bit of trial and error as some paths must be present at startup, so just move the iOS-related things out of the Xcode app bundle so you can move them back easily, and experiment with creating empty directories for those that Xcode complains about. I got Xcode 6.2 down to 2.5Gb that way (1.1Gb with HFS+ compression).
You may be able to work around this. https://thecoatlessprofessor.com/programming/cpp/r-compiler-tools-for-rcpp-on-macos/ guide worked for me
Getting the error message below during installation. Any hints would be appreciated.
RStan Version:
R version 4.0.3 (2020-10-10) Platform: x86_64-apple-darwin17.0 (64-bit) Running under: macOS Big Sur 10.16
Matrix products: default BLAS: /Library/Frameworks/R.framework/Versions/4.0/Resources/lib/libRblas.dylib LAPACK: /Library/Frameworks/R.framework/Versions/4.0/Resources/lib/libRlapack.dylib
locale: [1] en_CA.UTF-8/en_CA.UTF-8/en_CA.UTF-8/C/en_CA.UTF-8/en_CA.UTF-8
attached base packages: [1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached): [1] compiler_4.0.3 tools_4.0.3