调试到自定义库的安装失败

时间:2019-08-25 14:52:47

标签: r

对于软件包安装失败的原因,我有些茫然。我正在使用以下内容在Docker中进行安装:

Sys.getenv('CRAN_MIRROR')
# [1] "https://cloud.r-project.org"
.libPaths()
# [1] "/home/jovyan/r_lib"            "/usr/local/lib/R/site-library"
# [3] "/usr/lib/R/site-library"       "/usr/lib/R/library"   
install.packages('classInt', repos = Sys.getenv('CRAN_MIRROR'))

失败之处:

  

loadNamespace(j <-i [[1L]],c(lib.loc,.libPaths()),versionCheck = vI [[j]])中的错误:     没有名为“ e1071”的软件包

但是,实际上e1071已被安装并可用:

list.files(.libPaths()[1L], pattern = 'e1071')
# [1] "e1071"
library(e1071) # works
install.packages('e1071', repos = Sys.getenv('CRAN_MIRROR')) # also works

我不明白为什么安装失败...我缺少什么?

我唯一想到的另一件事是内部libraryinstall.packages之间的权限不匹配?而且

system('whoami')
# root

此外,这肯定是自定义库的问题,因为:

.libPaths(.libPaths()[-1L]) # remove custom lib
install.packages('classInt', repos = Sys.getenv('CRAN_MIRROR')) # successful

0 个答案:

没有答案