RTools 不工作 - 无法安装源包

时间:2021-06-25 02:42:13

标签: r

我正在尝试安装一些需要在 R 中编译的软件包。我从网站安装了 RTools,但出现“必须安装 RTools 才能构建软件包”的错误。我直接从 Rstudio 再次安装了它,不再有同样的问题。但是,由于路径不可写的错误,我无法安装软件包。 尝试执行命令 BiocManager::install("org.Rn.eg.db") 时 我收到以下输出和错误消息

    'getOption("repos")' replaces Bioconductor standard repositories, see '?repositories' for details

replacement repositories:
    CRAN: https://cran.rstudio.com/

Bioconductor version 3.14 (BiocManager 1.30.16), R 4.1.0 (2021-05-18)
Installing package(s) 'org.Rn.eg.db'
installing the source package ‘org.Rn.eg.db’

trying URL 'https://bioconductor.org/packages/3.14/data/annotation/src/contrib/org.Rn.eg.db_3.13.0.tar.gz'
Content type 'application/x-gzip' length 57471764 bytes (54.8 MB)
downloaded 54.8 MB

'"C:\PROGRA~1\R\R-41~1.0/bin/x64/Rterm.exe"' is not recognized as an internal or external command,
operable program or batch file.

The downloaded source packages are in
    ‘##MY PATH’
Installation paths not writeable, unable to update packages
  path: C:/Program Files/R/R-4.1.0/library
  packages:
    affy, affyio, airway, AnnotationDbi, Biobase, BiocGenerics, BiocVersion, biomaRt, Biostrings, broom, colorspace, curl,
    DelayedArray, devtools, dplyr, edgeR, EnhancedVolcano, fansi, GenomeInfoDb, GenomicRanges, gert, graph, Heatplus, IRanges,
    KEGGREST, limma, marray, MatrixGenerics, mime, preprocessCore, S4Vectors, STRINGdb, SummarizedExperiment, topGO, VennDetail,
    xfun, XVector, zip, zlibbioc
Old packages: 'BiocFileCache', 'BiocParallel', 'DESeq2', 'genefilter', 'glmnet', 'GSEABase', 'lme4', 'openxlsx', 'rio',
  'stringi'
Update all/some/none? [a/s/n]: 
n
Warning message:
In .inet_warning(msg) :
  installation of package ‘org.Rn.eg.db’ had non-zero exit status

从运行 sessionInfo()

R version 4.1.0 (2021-05-18)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19043)

Matrix products: default

locale:
[1] LC_COLLATE=English_Canada.1252  LC_CTYPE=English_Canada.1252    LC_MONETARY=English_Canada.1252
[4] LC_NUMERIC=C                    LC_TIME=English_Canada.1252    

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

other attached packages:
 [1] gprofiler2_0.2.0            DESeq2_1.32.0               SummarizedExperiment_1.22.0 Biobase_2.52.0             
 [5] MatrixGenerics_1.4.0        matrixStats_0.59.0          GenomicRanges_1.44.0        GenomeInfoDb_1.28.0        
 [9] IRanges_2.26.0              S4Vectors_0.30.0            BiocGenerics_0.38.0         factoextra_1.0.7           
[13] dendextend_1.15.1           RColorBrewer_1.1-2          pheatmap_1.0.12             ggpubr_0.4.0               
[17] ggtext_0.1.1                forcats_0.5.1               stringr_1.4.0               dplyr_1.0.6                
[21] purrr_0.3.4                 readr_1.4.0                 tidyr_1.1.3                 tibble_3.1.2               
[25] tidyverse_1.3.1             EnhancedVolcano_1.10.0      ggrepel_0.9.1               ggplot2_3.3.4              

loaded via a namespace (and not attached):
  [1] readxl_1.3.1           backports_1.2.1        lazyeval_0.2.2         splines_4.1.0          BiocParallel_1.26.0   
  [6] digest_0.6.27          htmltools_0.5.1.1      viridis_0.6.1          fansi_0.5.0            magrittr_2.0.1        
 [11] memoise_2.0.0          openxlsx_4.2.3         Biostrings_2.61.1      annotate_1.71.0        modelr_0.1.8          
 [16] extrafont_0.17         extrafontdb_1.0        colorspace_2.0-1       blob_1.2.1             rvest_1.0.0           
 [21] haven_2.4.1            xfun_0.24              crayon_1.4.1           RCurl_1.98-1.3         jsonlite_1.7.2        
 [26] genefilter_1.74.0      survival_3.2-11        glue_1.4.2             gtable_0.3.0           zlibbioc_1.39.0       
 [31] XVector_0.33.0         DelayedArray_0.19.0    proj4_1.0-10.1         car_3.0-10             Rttf2pt1_1.3.8        
 [36] maps_3.3.0             abind_1.4-5            scales_1.1.1           DBI_1.1.1              rstatix_0.7.0         
 [41] Rcpp_1.0.6             viridisLite_0.4.0      xtable_1.8-4           gridtext_0.1.4         foreign_0.8-81        
 [46] bit_4.0.4              htmlwidgets_1.5.3      httr_1.4.2             ellipsis_0.3.2         farver_2.1.0          
 [51] pkgconfig_2.0.3        XML_3.99-0.6           dbplyr_2.1.1           locfit_1.5-9.4         utf8_1.2.1            
 [56] labeling_0.4.2         tidyselect_1.1.1       rlang_0.4.11           AnnotationDbi_1.54.1   munsell_0.5.0         
 [61] cellranger_1.1.0       tools_4.1.0            cachem_1.0.5           cli_2.5.0              generics_0.1.0        
 [66] RSQLite_2.2.7          broom_0.7.7            fastmap_1.1.0          knitr_1.33             bit64_4.0.5           
 [71] fs_1.5.0               zip_2.2.0              KEGGREST_1.33.0        ash_1.0-15             ggrastr_0.2.3         
 [76] xml2_1.3.2             compiler_4.1.0         rstudioapi_0.13        beeswarm_0.4.0         plotly_4.9.4.1        
 [81] curl_4.3.1             png_0.1-7              ggsignif_0.6.2         reprex_2.0.0           geneplotter_1.71.0    
 [86] stringi_1.6.1          ggalt_0.4.0            lattice_0.20-44        Matrix_1.3-4           markdown_1.1          
 [91] vctrs_0.3.8            pillar_1.6.1           lifecycle_1.0.0        BiocManager_1.30.16    data.table_1.14.0     
 [96] bitops_1.0-7           R6_2.5.0               KernSmooth_2.23-20     gridExtra_2.3          rio_0.5.26            
[101] vipor_0.4.5            MASS_7.3-54            assertthat_0.2.1       withr_2.4.2            GenomeInfoDbData_1.2.6
[106] hms_1.1.0              grid_4.1.0             carData_3.0-4          lubridate_1.7.10       ggbeeswarm_0.6.0   

1 个答案:

答案 0 :(得分:0)

安装最新的 R 和 Rstudio 后,我在第一次使用时遇到了与您完全相同的问题。然后我只是以管理员身份运行 Rstuio 并且它起作用了。其他解决方案可以参考类似问题:https://community.rstudio.com/t/error-after-r-update-lib-c-program-files-r-r-3-5-0-library-is-not-writable/7947/2