问题描述
我与平时使用的计算机不同,因此是第一次安装软件包。尝试安装ggplot2导致以下错误。
install.packages("ggplot2")
also installing the dependency ‘withr’
trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.0/withr_2.3.0.tgz'
Warning in install.packages :
cannot open URL 'https://cran.rstudio.com/bin/macosx/contrib/4.0/withr_2.3.0.tgz': HTTP status was '404 Not Found'
Error in download.file(url,destfile,method,mode = "wb",...) :
cannot open URL 'https://cran.rstudio.com/bin/macosx/contrib/4.0/withr_2.3.0.tgz'
Warning in install.packages :
download of package ‘withr’ Failed
trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.0/ggplot2_3.3.2.tgz'
Content type 'application/x-gzip' length 4064530 bytes (3.9 MB)
==================================================
downloaded 3.9 MB
我尝试仅安装“ withr”并得到相同的错误。我尝试手动下载旧仓库的zip文件“ withr”并将其解压缩到库文件夹中,但这会出现以下错误。
Error: package or namespace load Failed for ‘ggplot2’: .onAttach Failed in attachNamespace() for 'ggplot2',details: call: NULL error: package ‘withr’ was installed before R 4.0.0: please re-install it
似乎'withr'的URL只是被破坏了,目前无法获取软件包;因此依赖它的任何软件包也无法安装。还有其他经历或找到解决方案吗?如何联系CRAN,让他们知道链接已失效?
MacOS版本的链接在https://cran.r-project.org/bin/macosx/contrib/4.0/withr_2.2.0.tgz
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)