[英]Cannot install or load packages on RStudio desktop
我嘗試安裝RcppEigen
包,但是出現錯誤,提示RStudio無法打開URL。 我也無法在 RStudio 中安裝其他軟件包。
# install
install.packages("RcppEigen")
# error message
Warning in install.packages :
unable to access index for repository https://cran.rstudio.com/src/contrib:
cannot open URL 'https://cran.rstudio.com/src/contrib/PACKAGES'
Warning in install.packages :
unable to access index for repository https://cran.rstudio.com/src/contrib:
cannot open URL 'https://cran.rstudio.com/src/contrib/PACKAGES'
Warning in install.packages :
package ‘RcppEigen’ is not available for this version of R
A version of this package for your version of R might be available elsewhere,
see the ideas at
https://cran.r-project.org/doc/manuals/r-patched/R-admin.html#Installing-packages
Warning in install.packages :
unable to access index for repository https://cran.rstudio.com/bin/macosx/big-sur-arm64/contrib/4.2:
cannot open URL 'https://cran.rstudio.com/bin/macosx/big-sur-arm64/contrib/4.2/PACKAGES'
我剛剛更新了我的 R 版本,所以所有的包都被手動復制到了新的庫中。 當我嘗試加載以前安裝的包時,再次發生錯誤,如下所示:
# load a package
library(StanHeaders)
# error message
Error: package or namespace load failed for ‘StanHeaders’:
.onLoad failed in loadNamespace() for 'RcppParallel', details:
call: dyn.load(file, DLLpath = DLLpath, ...)
error: unable to load shared object '/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/RcppParallel/libs/RcppParallel.so':
dlopen(/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/RcppParallel/libs/RcppParallel.so, 0x0006): Library not loaded: /Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/lib/libR.dylib
Referenced from: /Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/RcppParallel/libs/RcppParallel.so
Reason: tried: '/Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/lib/libR.dylib' (no such file), '/usr/lib/libR.dylib' (no such file)
希望有人可以幫助解決這兩個問題! 謝謝!
在全局選項中禁用安全下載設置可能會解決問題。 可以在此鏈接中找到其他一些解決方案。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.