我在尝试加载新库时在R中遇到此错误。
Installation failed: unable to load shared object 'C:/R/R-3.4.0/library/curl/libs/x64/curl.dll':
`maximal number of DLLs reached...
它与curl
无关,它可能是任何库。我的sessionInfo
如下所示:
R version 3.4.0 (2017-04-21)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 7 x64 (build 7601) Service Pack 1
Matrix products: default
locale:
[1] LC_COLLATE=English_United Kingdom.1252
[2] LC_CTYPE=English_United Kingdom.1252
[3] LC_MONETARY=English_United Kingdom.1252
[4] LC_NUMERIC=C
[5] LC_TIME=English_United Kingdom.1252
attached base packages:
[1] parallel stats graphics grDevices utils datasets
[7] methods base
other attached packages:
[1] M3Drop_1.2.0 numDeriv_2016.8-1 bindrcpp_0.2
[4] Seurat_2.0.1 Matrix_1.2-11 cowplot_0.8.0
[7] scater_1.4.0 Biobase_2.36.2 BiocGenerics_0.22.0
[10] tidyr_0.6.3 dplyr_0.7.2 ggplot2_2.2.1
[13] extrafont_0.17
loaded via a namespace (and not attached):
[1] shinydashboard_0.6.1 R.utils_2.5.0
[3] lme4_1.1-13 RSQLite_2.0
[5] AnnotationDbi_1.38.2 htmlwidgets_0.9
[7] grid_3.4.0 trimcluster_0.1-2
[9] ranger_0.8.0 BiocParallel_1.10.1
[11] Rtsne_0.13 devtools_1.13.3
[13] munsell_0.4.3 codetools_0.2-15
[15] ica_1.0-1 captioner_2.2.3
[17] statmod_1.4.30 withr_2.0.0
[19] colorspace_1.3-2 knitr_1.16
[21] stats4_3.4.0 ROCR_1.0-7
[23] robustbase_0.92-7 dtw_1.18-1
[25] Rttf2pt1_1.3.4 NMF_0.20.6
[27] labeling_0.3 lars_1.2
[29] tximport_1.4.0 bbmle_1.0.19
[31] GenomeInfoDbData_0.99.0 mnormt_1.5-5
[33] bit64_0.9-7 rhdf5_2.20.0
[35] diptest_0.75-7 R6_2.2.2
[37] doParallel_1.0.10 GenomeInfoDb_1.12.2
[39] ggbeeswarm_0.6.0 VGAM_1.0-4
[41] locfit_1.5-9.1 flexmix_2.3-14
[43] bitops_1.0-6 DelayedArray_0.2.7
[45] assertthat_0.2.0 SDMTools_1.1-221
[47] scales_0.4.1 nnet_7.3-12
[49] ggjoy_0.3.0 beeswarm_0.2.3
[51] gtable_0.2.0 rlang_0.1.2
[53] MatrixModels_0.4-1 genefilter_1.58.1
[55] scatterplot3d_0.3-40 splines_3.4.0
[57] extrafontdb_1.0 lazyeval_0.2.0
[59] ModelMetrics_1.1.0 acepack_1.4.1
[61] checkmate_1.8.3 reshape2_1.4.2
[63] backports_1.1.0 httpuv_1.3.5
[65] Hmisc_4.0-3 caret_6.0-76
[67] tools_3.4.0 gridBase_0.4-7
[69] gplots_3.0.1 RColorBrewer_1.1-2
[71] proxy_0.4-17 Rcpp_0.12.12
[73] plyr_1.8.4 base64enc_0.1-3
[75] zlibbioc_1.22.0 purrr_0.2.3
[77] RCurl_1.95-4.8 rpart_4.1-11
[79] pbapply_1.3-3 viridis_0.4.0
[81] S4Vectors_0.14.3 SummarizedExperiment_1.6.3
[83] cluster_2.0.6 magrittr_1.5
[85] data.table_1.10.4 SparseM_1.77
[87] mvtnorm_1.0-6 matrixStats_0.52.2
[89] mime_0.5 xtable_1.8-2
[91] pbkrtest_0.4-7 XML_3.98-1.9
[93] mclust_5.3 IRanges_2.10.2
[95] gridExtra_2.2.1 compiler_3.4.0
[97] biomaRt_2.32.1 tibble_1.3.3
[99] KernSmooth_2.23-15 minqa_1.2.4
[101] R.oo_1.21.0 htmltools_0.3.6
[103] segmented_0.5-2.1 mgcv_1.8-18
[105] Formula_1.2-2 geneplotter_1.54.0
[107] tclust_1.2-7 DBI_0.7
[109] diffusionMap_1.1-0 MASS_7.3-47
[111] fpc_2.1-10 car_2.1-5
[113] R.methodsS3_1.7.1 gdata_2.18.0
[115] bindr_0.1 igraph_1.1.2
[117] GenomicRanges_1.28.4 pkgconfig_2.0.1
[119] sn_1.5-0 registry_0.3
[121] foreign_0.8-69 foreach_1.4.3
[123] annotate_1.54.0 vipor_0.4.5
[125] rngtools_1.2.4 pkgmaker_0.22
[127] XVector_0.16.0 stringr_1.2.0
[129] digest_0.6.12 tsne_0.1-3
[131] htmlTable_1.9 edgeR_3.18.1
[133] kernlab_0.9-25 shiny_1.0.4
[135] gtools_3.5.0 quantreg_5.33
[137] modeltools_0.2-21 rjson_0.2.15
[139] nloptr_1.0.4 nlme_3.1-131
[141] viridisLite_0.2.0 limma_3.32.5
[143] lattice_0.20-35 httr_1.3.0
[145] DEoptimR_1.0-8 survival_2.41-3
[147] glue_1.1.1 FNN_1.1
[149] prabclus_2.2-6 iterators_1.0.8
[151] bit_1.1-12 class_7.3-14
[153] stringi_1.1.5 mixtools_1.1.0
[155] blob_1.1.0 DESeq2_1.16.1
[157] latticeExtra_0.6-28 caTools_1.17.1
[159] memoise_1.1.0 irlba_2.2.1
[161] ape_4.1
我在Windows上,我在this question尝试了Sys.setenv(R_MAX_NUM_DLLS=500)
,但它似乎没有做任何事情。我试图将它添加到Rprofile.site
文件并重新启动R但我仍然收到错误。卸载库或不加载如此多的库等不是解决方案。我看到了将R_MAX_NUM_DLLS=500
添加到.Renviron
文件的选项,但我不确定Windows是否有这个。
我想知道是否有人有任何见解。
答案 0 :(得分:5)
答案 1 :(得分:5)
系统环境变量R_MAX_NUM_DLLS
是R启动过程之前必须设置的几个变量之一或非常。设置.Rprofile
太晚了。但是,您可以在~/.Renviron
中进行设置,然后应该包含以下行:
R_MAX_NUM_DLLS=500
这适用于所有平台/操作系统,包括Windows。 Windows上棘手的部分是弄清楚文件应该位于何处。解决这个问题的最简单方法是致电:
> normalizePath("~/.Renviron", mustWork = FALSE)
[1] "/home/alice/.Renviron"
在Windows上,您可能会看到以下内容:
> normalizePath("~/.Renviron", mustWork = FALSE)
[1] "C:\\Users\\alice\\Documents\\.Renviron"
请注意~/
如何指向C:\\Users\\alice\\Documents\\
而不指向C:\\Users\\alice\\
,如果一个人来自Unix环境,则可能会如此。