我不记得有任何问题,但似乎突然,我无法安装任何包,因为testthat
没有通过测试.作为一个catch-22,我也无法安装testthat
,因为它不能通过它的测试.
R version 3.0.1 (2013-05-16) -- "Good Sport" Copyright (C) 2013 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu (64-bit) Error in library(testthat) : there is no package called 'testthat' [Previously saved workspace restored] > > install.packages("testthat") Installing package into '/home/user/R/x86_64-pc-linux-gnu-library/3.0' (as 'lib' is unspecified) --- Please select a CRAN mirror for use in this session --- Fontconfig warning: "/etc/fonts/conf.d/50-user.conf", line 14: reading configurations from ~/.fonts.conf is deprecated. trying URL 'http://cran.cs.wwu.edu/src/contrib/testthat_0.8.1.tar.gz' Content type 'application/x-gzip' length 40777 bytes (39 Kb) opened URL ================================================== downloaded 39 Kb Error in library(testthat) : there is no package called 'testthat' Calls: source -> withVisible -> eval -> eval -> library Execution halted The downloaded source packages are in '/tmp/RtmpMoaIPO/downloaded_packages' Warning message: In install.packages("testthat") : installation of package 'testthat' had non-zero exit status
有没有办法绕过一次安装运行的测试或以其他方式解决这个问题,以便我可以修复我的R安装?
我生活在互联网不佳的地方,我不想下载新版本的R及其所有依赖项来解决这个问题.所以你可以手动安装旧版本的test:http://cran.r-project.org/src/contrib/Archive/testthat/
在版本3.0.2上,测试版本0.8.1似乎工作.下载gzip文件后,执行以下操作:
R CMD INSTALL testthat_0.8.1.tar.gz
如果您使用的是Linux,则不必手动下载软件包,通过默认管理器安装依赖项(在本例中为"testthat")也可以.我有ubuntu 14.04和R 3.0.2
sudo apt-get install r-cran-testthat
运行上面的命令后,我终于可以安装漩涡了.