R语言 似乎无法安装“devtools”软件包

c2e8gylq  于 2023-02-14  发布在  其他
关注(0)|答案(1)|浏览(855)

我需要安装Devtools,这样我就可以从github下载0.5.4的htmltools软件包,几乎每个我尝试安装的软件包都会给出一个错误消息,指出我的htmltools版本是0.5.2,但该软件包需要0.5.4版本,我认为这是github开发人员的版本,但我不能安装devtools,因为它指出此错误消息要求htmltools 0.5.4:

* installing *source* package 'bslib' ...
** package 'bslib' successfully unpacked and MD5 sums checked
** using staged installation
** R
** inst
** byte-compile and prepare package for lazy loading
Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) : 
  namespace 'htmltools' 0.5.2 is being loaded, but >= 0.5.4 is required
Calls: <Anonymous> ... withCallingHandlers -> loadNamespace -> namespaceImport -> loadNamespace
Execução interrompida
ERROR: lazy loading failed for package 'bslib'
* removing 'C:/Users/Rafael-PC/Documents/R/win-library/4.0/bslib'
Warning in install.packages :
  installation of package ‘bslib’ had non-zero exit status
* installing *source* package 'callr' ...
** package 'callr' successfully unpacked and MD5 sums checked
** using staged installation
** R
** inst
** byte-compile and prepare package for lazy loading
Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) : 
  namespace 'processx' 3.5.3 is being loaded, but >= 3.6.1 is required
Calls: <Anonymous> ... namespaceImportFrom -> asNamespace -> loadNamespace
Execução interrompida
ERROR: lazy loading failed for package 'callr'
* removing 'C:/Users/Rafael-PC/Documents/R/win-library/4.0/callr'
* restoring previous 'C:/Users/Rafael-PC/Documents/R/win-library/4.0/callr'
Warning in install.packages :
  installation of package ‘callr’ had non-zero exit status
* installing *source* package 'lifecycle' ...
** package 'lifecycle' successfully unpacked and MD5 sums checked
** using staged installation
** R
** inst
** byte-compile and prepare package for lazy loading
Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) : 
  namespace 'rlang' 1.0.2 is being loaded, but >= 1.0.6 is required
Calls: <Anonymous> ... withCallingHandlers -> loadNamespace -> namespaceImport -> loadNamespace
Execução interrompida
ERROR: lazy loading failed for package 'lifecycle'
* removing 'C:/Users/Rafael-PC/Documents/R/win-library/4.0/lifecycle'
* restoring previous 'C:/Users/Rafael-PC/Documents/R/win-library/4.0/lifecycle'
Warning in install.packages :
  installation of package ‘lifecycle’ had non-zero exit status
* installing *source* package 'pkgload' ...
** package 'pkgload' successfully unpacked and MD5 sums checked
** using staged installation
** R
** inst
** byte-compile and prepare package for lazy loading
Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) : 
  namespace 'rlang' 1.0.2 is being loaded, but >= 1.0.3 is required
Calls: <Anonymous> ... withCallingHandlers -> loadNamespace -> namespaceImport -> loadNamespace
Execução interrompida
ERROR: lazy loading failed for package 'pkgload'
* removing 'C:/Users/Rafael-PC/Documents/R/win-library/4.0/pkgload'
Warning in install.packages :
  installation of package ‘pkgload’ had non-zero exit status
* installing *source* package 'pkgbuild' ...
** package 'pkgbuild' successfully unpacked and MD5 sums checked
** using staged installation
** R
** byte-compile and prepare package for lazy loading
Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) : 
  namespace 'cli' 3.2.0 is being loaded, but >= 3.4.0 is required
Calls: <Anonymous> ... namespaceImportFrom -> asNamespace -> loadNamespace
Execução interrompida
ERROR: lazy loading failed for package 'pkgbuild'
* removing 'C:/Users/Rafael-PC/Documents/R/win-library/4.0/pkgbuild'
Warning in install.packages :
  installation of package ‘pkgbuild’ had non-zero exit status
ERROR: dependency 'bslib' is not available for package 'pkgdown'
* removing 'C:/Users/Rafael-PC/Documents/R/win-library/4.0/pkgdown'
Warning in install.packages :
  installation of package ‘pkgdown’ had non-zero exit status
ERROR: dependencies 'pkgbuild', 'pkgdown', 'pkgload' are not available for package 'devtools'
* removing 'C:/Users/Rafael-PC/Documents/R/win-library/4.0/devtools'
Warning in install.packages :
  installation of package ‘devtools’ had non-zero exit status

我尝试通过CRAN安装htmltools,但错误仍然存在。

neskvpey

neskvpey1#

如果你正在使用jupyter notebook for R,尝试在anaconda命令提示符下安装devtools包。尝试下面的代码install.packages(“devtools”)在anaconda提示符下有时候直接在notebook中安装包不会起作用,并且检查你的R版本是否支持devtools

相关问题