我遇到了install.packages
拉下我想要的软件包然后无法完成安装的问题。给出的原因是某些依赖包不可用。除了那些包裹可用。
例如:
options(repos="http://cran.r-project.org")
install.packages("viridis")
# Installing package into ‘/devel/r-user-packages/bamboo-CI/base’
# (as ‘lib’ is unspecified)
# trying URL 'http://cran.r-project.org/src/contrib/viridis_0.5.0.tar.gz'
# Content type 'application/x-gzip' length 1754678 bytes (1.7 MB)
# ==================================================
# downloaded 1.7 MB
#
# * installing *source* package ‘viridis’ ...
# ** package ‘viridis’ successfully unpacked and MD5 sums checked
# ** R
# ** inst
# ** preparing package for lazy loading
# ** help
# *** installing help indices
# converting help for package ‘viridis’
# finding HTML links ... done
# reexports html
# Rd warning: /tmp/Rtmpm2qFw0/R.INSTALL66597c318399/viridis/man/reexports.Rd:22: missing file link ‘inferno’
# ... more stuff similar to ^^
# *** copying figures
# ** building package indices
# ** installing vignettes
# ** testing if installed package can be loaded
# Error : package ‘viridisLite’ required by ‘viridis’ could not be found
# Error: loading failed
# Execution halted
# ERROR: loading failed
# * removing ‘/devel/r-user-packages/bamboo-CI/base/viridis’
#
# The downloaded source packages are in
# ‘/tmp/RtmpUSId98/downloaded_packages’
# Warning message:
# In install.packages("viridis") :
# installation of package ‘viridis’ had non-zero exit status
这很清楚,只是安装了viridisLite
并且没有问题加载。在得到上述错误后,我立即做了:
library(viridisLite)
plasma(4)
# [1] "#0D0887FF" "#9C179EFF" "#ED7953FF" "#F0F921FF"
我认为这不是viridis
特有的问题。我发现devtools
无法找到withr
的已安装副本,其中doParallel
无法找到已安装的foreach
副本等错误。
我尝试过运行3个不同的CRAN镜子而没有任何运气。我从一个完全干净的(基本包除外)库路径开始。我还仔细检查以确保在我上面的示例中安装的依赖项(viridisLite
,withr
和foreach
)是我正在尝试安装的软件包可接受的版本。
我在CentOS 7机器上运行R v3.4.3。大多数软件包安装正常(我更新了大约200个软件包,有15个软件失败)。
这周围有任何已知问题吗?为什么R不能找到这些包?我怀疑其他东西出了问题,但它引发了一条无益的消息。但是我不知道真正的问题是什么。
提前致谢。