Rmarkdown unable to knit

After I install to the latest Rstudio for mac Catalina, I can't knit my Rmarkdown file. looks like there is something wrong with the 'Rcpp' package, but I don't know how to fix it.

Error in dyn.load(file, DLLpath = DLLpath, ...) :
unable to load shared object '/Library/Frameworks/R.framework/Versions/3.6/Resources/library/Rcpp/libs/Rcpp.so':
dlopen(/Library/Frameworks/R.framework/Versions/3.6/Resources/library/Rcpp/libs/Rcpp.so, 6): Library not loaded: /Library/Frameworks/R.framework/Versions/4.0/Resources/lib/libR.dylib
Referenced from: /Library/Frameworks/R.framework/Versions/3.6/Resources/library/Rcpp/libs/Rcpp.so
Reason: image not found
Calls: :: ... asNamespace -> loadNamespace -> library.dynam -> dyn.load
Execution halted

Did you try reinstalling Rcpp ?

hi, I did but failed to install it after I remove the package. I can only drag the 'rcpp' manually to the library, but in this way, it still could not load.

As you are trying to install from source did you already setup your environment ?

Thank you so much! I followed the instruction and it works rn.

1 Like

If your question's been answered (even by you!), would you mind choosing a solution? It helps other people see which questions still need help, or find solutions if they have similar problems. Here’s how to do it:

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.