简体   繁体   English

无法在 Rstudio 中安装软件包

[英]Cannot install packages in Rstudio

I just installed R studio and I was trying to install rmarkdown.我刚刚安装了 R 工作室,我正在尝试安装 rmarkdown。 However, I got the error as below.但是,我得到了如下错误。 I unchecked the box ''Tools -> Global Options -> Packages -> Use secure download method for HTTP'' as someone suggested.正如有人建议的那样,我取消选中了“工具-> 全局选项-> 包-> 使用 HTTP 的安全下载方法”框。 No help.没有帮助。 I tried other packages, I got the same error.我尝试了其他软件包,我得到了同样的错误。 错误

You should remove the package and reinstall it using dependencies = TRUE :您应该删除 package 并使用dependencies = TRUE重新安装:

 remove.packages("rmarkdown") install.packages("rmarkdown", dependencies = TRUE) library(rmarkdown)

Output: Output:

 Warning message: package 'rmarkdown' was built under R version 4.1.2

I had the same issue and it was due to the newest version of the toolboxes include the names is under new package names.我遇到了同样的问题,这是由于最新版本的工具箱包含的名称位于新的 package 名称下。 Go to the URL https://cran.rstudio.com/src/contrib/PACKAGES and search for "rmarkdown". Go to the URL https://cran.rstudio.com/src/contrib/PACKAGES and search for "rmarkdown". Find the package name and try to install that instead.找到 package 名称并尝试安装它。 It's like a.zip file that includes several packages to your library.它就像一个 .zip 文件,其中包含几个包到您的库中。 Try install.packages("accucor").试试 install.packages("accucor")。 It worked for me at least, and then try to install the rmarkdown package.它至少对我有用,然后尝试安装 rmarkdown package。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM