R语言报错错误: package or namespace load failed for ‘ggplot2’ in get(method, envir = home):
RStudio版本:4.0.2
顺利安装gglot2包
但是报错,信息如下:
错误: package or namespace load failed for ‘ggplot2’ in get(method, envir = home):
lazy-load database '/Library/Frameworks/R.framework/Versions/4.0/Resources/library/ggplot2/R/ggplot2.rdb' is corrupt
此外: Warning messages:
1: 程辑包‘ggplot2’是用R版本4.0.2 来建造的
2: In .registerS3method(fin[i, 1], fin[i, 2], fin[i, 3], fin[i, 4], :
重新评估被中断的许诺
3: In get(method, envir = home) : 重新评估被中断的许诺
4: In get(method, envir = home) : internal error -5 in R_decompress1
解决办法:
https://blog.csdn.net/qq_19600291/article/details/108957304
升级到的新版本后,您需要重新编译旧软件包 R
。在R
终端中运行以下行
update.packages(ask=FALSE,checkBuilt=TRUE,repos="https://cloud.r-project.org")
然后
install.packages(c("Rcpp", "caret", "forecast", "ggplot2", "quadprog"),dependencies=TRUE,repos="https://cloud.r-project.org")
赞 (0)