依赖包“ package_name”;无法使用 [英] Dependency package "package_name" not available

查看:116
本文介绍了依赖包“ package_name”;无法使用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

尝试在RStudio中进行构建和重新加载时出现一个奇怪的错误。在我的描述文件中,我包含了一个在组织内部构建和维护的软件包。它不在CRAN上。本质上,当我更新DESCRIPTION文件时(取决于:...),会出现以下错误:

I'm getting a strange error when trying to build and reload in RStudio. In my description file I've included a package that I have built and maintain within my organization. It's not on CRAN. Essentially, when I update the DESCRIPTION file (Depends: ...), I get this error:

==> devtools::document(roclets=c('rd', 'collate', 'namespace', 'vignette'))

Updating fczstudy documentation
Loading fczstudy
Error in (function (dep_name, dep_ver = NA, dep_compare = NA)  : 
  Dependency package surv3 not available.
Calls: suppressPackageStartupMessages ... <Anonymous> -> load_all -> load_depends -> mapply -> <Anonymous>
Execution halted

在这种情况下, surv3 是我在组织内维护的软件包-我可以确认它确实已安装,因为我正在使用它。

In this case, surv3 is a package that I maintain within my organization - I can confirm that it is indeed installed because I'm using it.

此CRAN的其他软件包似乎没有发生这种情况,它是几天前才开始的。它不允许我导入我的软件包(surv3)

This doesn't seem to happen with other packages from CRAN. It just started a few days ago. It's not allowing me to import my package (surv3)

我真的不确定如何调试。

I'm really not sure how to debug this.

traceback()在ctrl + shift + B不返回任何内容后,在控制台中

traceback() in the console after ctrl+shift+B returns nothing

这是我的 sessionInfo()

R version 3.2.0 (2015-04-16)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 8 x64 (build 9200)

locale:
[1] LC_COLLATE=English_United States.1252 
[2] LC_CTYPE=English_United States.1252   
[3] LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C                          
[5] LC_TIME=English_United States.1252    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods  
[7] base     

other attached packages:
[1] surv3_1.01     knitr_1.11     fczstudy_0.1.0 dplyr_0.4.3   
[5] ggplot2_1.0.1 

loaded via a namespace (and not attached):
 [1] Rcpp_0.12.1      assertthat_0.1   digest_0.6.8    
 [4] MASS_7.3-40      R6_2.1.1         grid_3.2.0      
 [7] plyr_1.8.3       gtable_0.1.2     DBI_0.3.1       
[10] magrittr_1.5     scales_0.3.0     stringi_0.5-5   
[13] lazyeval_0.1.10  reshape2_1.4.1   rmarkdown_0.8.1 
[16] proto_0.3-10     tools_3.2.0      stringr_1.0.0   
[19] munsell_0.4.2    yaml_2.1.13      parallel_3.2.0  
[22] colorspace_1.2-6 htmltools_0.2.6 


推荐答案

在项目选项>构建工具对话框中取消选择带圆圈的选项可以解决此问题,尽管我不清楚原因:

Unselecting the circled option in Project Options > Build Tools dialogue solves this problem, although I'm not quite clear on why:

< img src = https://i.stack.imgur.com/2dkun.jpg alt =在此处输入图片描述>

这篇关于依赖包“ package_name”;无法使用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆