我最近更新了 R 的新版本(4.02),每次我想使用一个库时,都会出现这样的消息“错误:包‘rmarkdown’是在 R 4.0.0 之前安装的:请重新安装它”,所以我用这个命令安装每一个库
sudo su - -c "R -e \"install.packages('shiny', repos='http://cran.rstudio.com/', dependencies = TRUE)\""
即使重新安装了我的库,我也无法安装“shiny”,当我尝试安装shiny时,我遇到了这个问题
Error: package ‘rmarkdown’ was installed before R 4.0.0: please re-install it
Execution halted
ERROR: lazy loading failed for package ‘flexdashboard’
* removing ‘/usr/local/lib/R/site-library/flexdashboard’
ERROR: dependency ‘debugme’ is not available for package ‘webdriver’
* removing ‘/usr/local/lib/R/site-library/webdriver’
ERROR: dependencies ‘debugme’, ‘pingr’, ‘webdriver’ are not available for package ‘shinytest’
* removing ‘/usr/local/lib/R/site-library/shinytest’
我不确定获得干净环境的最佳方法是否是卸载 R。
感谢您的帮助