install_github 的权限被拒绝,但之前链接的解决方案不起作用

问题描述 投票:0回答:0

This question is almost exact repost of this question. 但是,评论中提供的解决方案并没有解决我的问题。运行相同的代码后,包括先决条件包:

install.packages(c("coda","mvtnorm","devtools","loo","dagitty","shape"))
devtools::install_github("rmcelreath/rethinking")

我得到这个错误,本质上是一样的,但是是中文的:

将程序包安装入‘C:/Users/DELL/AppData/Local/R/win-library/4.2’
(因为‘lib’没有被指定)
ERROR: dependency 'cmdstanr' is not available for package 'rethinking'
* removing 'C:/Users/DELL/AppData/Local/R/win-library/4.2/rethinking'
Warning messages:
1: package ‘cmdstanr’ 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 
2: In file.copy(savedcopy, lib, recursive = TRUE) :
  problem copying C:\Users\DELL\AppData\Local\R\win-library\4.2\00LOCK\Rcpp\libs\x64\Rcpp.dll to C:\Users\DELL\AppData\Local\R\win-library\4.2\Rcpp\libs\x64\Rcpp.dll: Permission denied
3: In file.copy(savedcopy, lib, recursive = TRUE) :
  problem copying C:\Users\DELL\AppData\Local\R\win-library\4.2\00LOCK\cli\libs\x64\cli.dll to C:\Users\DELL\AppData\Local\R\win-library\4.2\cli\libs\x64\cli.dll: Permission denied
4: In file.copy(savedcopy, lib, recursive = TRUE) :
  problem copying C:\Users\DELL\AppData\Local\R\win-library\4.2\00LOCK\vctrs\libs\x64\vctrs.dll to C:\Users\DELL\AppData\Local\R\win-library\4.2\vctrs\libs\x64\vctrs.dll: Permission denied
5: In i.p(...) :
  安装程序包‘C:/Users/DELL/AppData/Local/Temp/RtmpAtUPxi/file2c9425a57fc2/rethinking_2.31.tar.gz’时退出狀態的值不是0

我已经尝试了以下所有方法:

  • 以管理员身份运行 RStudio。
  • 在没有空格的路径名中重新安装 R 和 RStudio(如链接问题中所建议)。
  • 运行默认
    libPaths
    以及使用一个位置。
  • 对着电脑大喊大叫

我不太确定我还需要做什么才能让它运行。任何帮助都会很棒。

r github installation package rstudio
© www.soinside.com 2019 - 2024. All rights reserved.