I am new to stan and encountered several errors when running the code.
Error in compileCode(f, code, language = language, verbose = verbose) :
using local_scalar_t__ = double; ^46 warnings generated.ld: framework not found CoreFoundationclang-4.0: error: linker command failed with exit code 1 (use -v to see invocation)make: *** [/Library/Frameworks/R.framework/Resources/share/make/shlib.mk:10: filea6212d2a9090.so] Error 1
Error in sink(type = "output") : invalid connection
I installed rstan from the following advice from other posts,
remove.packages(c("StanHeaders", "rstan"))
install.packages("StanHeaders", repos = c("https://mc-stan.org/r-packages/", getOption("repos")))
install.packages("rstan", repos = c("https://mc-stan.org/r-packages/", getOption("repos")))
My R version is "R version 4.2.2 (2022-10-31)" on MacOS 13.2.1. The Configuring C Toolchain for Mac is Xcode 14.2 with XCode CLI, and gfortran8.2, without ~/.R/Makevars.
I also tried installing rstan by source but it gave me clang-4.0: error: no such file or directory: '/Library/Frameworks/R.framework/Versions/4.2/Resources/library/rstan/lib//libStanServices.a'
make: *** [/Library/Frameworks/R.framework/Resources/share/make/shlib.mk:10: rstan.so] Error 1
Hello,
I am new to stan and encountered several errors when running the code.
Error in compileCode(f, code, language = language, verbose = verbose) : using local_scalar_t__ = double; ^46 warnings generated.ld: framework not found CoreFoundationclang-4.0: error: linker command failed with exit code 1 (use -v to see invocation)make: *** [/Library/Frameworks/R.framework/Resources/share/make/shlib.mk:10: filea6212d2a9090.so] Error 1 Error in sink(type = "output") : invalid connection
I installed rstan from the following advice from other posts, remove.packages(c("StanHeaders", "rstan")) install.packages("StanHeaders", repos = c("https://mc-stan.org/r-packages/", getOption("repos"))) install.packages("rstan", repos = c("https://mc-stan.org/r-packages/", getOption("repos")))
My R version is "R version 4.2.2 (2022-10-31)" on MacOS 13.2.1. The Configuring C Toolchain for Mac is Xcode 14.2 with XCode CLI, and gfortran8.2, without ~/.R/Makevars.
I also tried installing rstan by source but it gave me clang-4.0: error: no such file or directory: '/Library/Frameworks/R.framework/Versions/4.2/Resources/library/rstan/lib//libStanServices.a' make: *** [/Library/Frameworks/R.framework/Resources/share/make/shlib.mk:10: rstan.so] Error 1
Thank you so much!