Regarding Rstan : Error while calling stan file


I am facing issue while calling my stan file. I have installed Rstan with the help of command :
install.packages(“rstan”, repos = “”, dependencies = TRUE)
It is installed perfectly

But while using stan function, I get the error :
Error in compileCode(f, code, language = language, verbose = verbose) :
typedef double local_scalar_t__; ^28 warnings generated.ld: framework not found CoreFoundationclang: error: linker command failed with exit code 1 (use -v to see invocation)make: *** [] Error 1
Error in sink(type = “output”) : invalid connection

Please let me know how it can be fixed.