简体   繁体   English

在R中安装软件包时出错

[英]Error when installing packages in R

I need to install 2 packages in R in order to run a different library. 我需要在R中安装2个软件包才能运行其他库。

When installing limma and IRanges from Bioconductor, I get the following error: 从Bioconductor安装limma和IRanges时,出现以下错误:

> install.packages("IRanges_1.18.4.tar.gz") 
Installing package into ‘C:/Users/Zambidis Lab/Documents/R/win-library/3.0’
(as ‘lib’ is unspecified)
inferring 'repos = NULL' from 'pkgs'
* installing *source* package 'IRanges' ...
** libs

*** arch - i386
Warning: running command 'make -f "C:/PROGRA~1/R/R-32~1.0/etc/i386/Makeconf" -f "C:/PROGRA~1/R/R-32~1.0/share/make/winshlib.mk" SHLIB="IRanges.dll" OBJECTS="AEbufs.o CompressedIRangesList_class.o CompressedList_class.o DataFrame_class.o GappedRanges_class.o Grouping_class.o Hits_class.o IRanges_class.o IRanges_constructor.o IntervalTree.o Ocopy_byteblocks.o R_init_IRanges.o RangedData_class.o Ranges_comparison.o RleViews_utils.o Rle_class.o Rle_utils.o SEXP_utils.o SharedDouble_class.o SharedInteger_class.o SharedRaw_class.o SharedVector_class.o SimpleList_class.o SimpleRangesList_class.o Vector_class.o XDoubleViews_utils.o XIntegerViews_utils.o XRawList_comparison.o XVectorList_class.o XVector_class.o anyMissing.o common.o compact_bitvector.o coverage_methods.o dlist.o encodeOverlaps_methods.o errabort.o hash_utils.o int_utils.o inter_range_methods.o localmem.o memalloc.o rbTree.o safe_arithm.o sort_utils.o str_utils.o ucsc_handlers.o vector_copy.o"' had status 127
ERROR: compilation failed for package 'IRanges'
* removing 'C:/Users/Zambidis Lab/Documents/R/win-library/3.0/IRanges'
* restoring previous 'C:/Users/Zambidis Lab/Documents/R/win-library/3.0/IRanges'
Warning in file.copy(lp, dirname(pkgdir), recursive = TRUE, copy.date = TRUE) :
  problem copying C:\Users\Zambidis Lab\Documents\R\win-library\3.0\00LOCK-IRanges\IRanges\libs\x64\IRanges.dll to C:\Users\Zambidis Lab\Documents\R\win-library\3.0\IRanges\libs\x64\IRanges.dll: Permission denied
Warning messages:
1: running command '"C:/PROGRA~1/R/R-32~1.0/bin/x64/R" CMD INSTALL -l "C:\Users\Zambidis Lab\Documents\R\win-library\3.0" "IRanges_1.18.4.tar.gz"' had status 1 
2: In install.packages("IRanges_1.18.4.tar.gz") :
  installation of package ‘IRanges_1.18.4.tar.gz’ had non-zero exit status

I tried to install GO.db though the error is the same: 我尝试安装GO.db,尽管错误相同:

    > source("http://bioconductor.org/biocLite.R")
    Bioconductor version 2.12 (BiocInstaller 1.10.4), ?biocLite for help
    A newer version of Bioconductor is available for this version of R, ?BiocUpgrade for help
    > biocLite("GO.db")
    BioC_mirror: http://bioconductor.org
    Using Bioconductor version 2.12 (BiocInstaller 1.10.4), R version 3.2.0.
    Temporarily using Bioconductor version 2.12
    Installing package(s) 'GO.db'
    Warning: unable to access index for repository http://bioconductor.org/packages/2.12/bioc/bin/windows/contrib/3.2
    Warning: unable to access index for repository http://bioconductor.org/packages/2.12/data/annotation/bin/windows/contrib/3.2
    Warning: unable to access index for repository http://bioconductor.org/packages/2.12/data/experiment/bin/windows/contrib/3.2
    Warning: unable to access index for repository http://bioconductor.org/packages/2.12/extra/bin/windows/contrib/3.2
    installing the source package ‘GO.db’

trying URL 'http://bioconductor.org/packages/2.12/data/annotation/src/contrib/GO.db_2.9.0.tar.gz'
Content type 'application/x-gzip' length 25473946 bytes (24.3 MB)
downloaded 24.3 MB

* installing *source* package 'GO.db' ...
** R
** inst
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
*** arch - i386
Error : .onLoad failed in loadNamespace() for 'GO.db', details:
  call: match.arg(synchronous, c("off", "normal", "full"))
  error: 'arg' must be NULL or a character vector
Error: loading failed
Execution halted
*** arch - x64
Error : .onLoad failed in loadNamespace() for 'GO.db', details:
  call: match.arg(synchronous, c("off", "normal", "full"))
  error: 'arg' must be NULL or a character vector
Error: loading failed
Execution halted
ERROR: loading failed for 'i386', 'x64'
* removing 'C:/Users/Zambidis Lab/Documents/R/win-library/3.0/GO.db'
* restoring previous 'C:/Users/Zambidis Lab/Documents/R/win-library/3.0/GO.db'

The downloaded source packages are in
        ‘C:\Users\Zambidis Lab\AppData\Local\Temp\RtmpU3gtWD\downloaded_packages’
Old packages: 'IRanges', 'limma'
Update all/some/none? [a/s/n]: a
Warning: unable to access index for repository http://bioconductor.org/packages/2.12/bioc/bin/windows/contrib/3.2
Warning: unable to access index for repository http://bioconductor.org/packages/2.12/data/annotation/bin/windows/contrib/3.2
Warning: unable to access index for repository http://bioconductor.org/packages/2.12/data/experiment/bin/windows/contrib/3.2
Warning: unable to access index for repository http://bioconductor.org/packages/2.12/extra/bin/windows/contrib/3.2
Packages which are only available in source form, and may need compilation of C/C++/Fortran: ‘IRanges’ ‘limma’
  These will not be installed
Warning messages:
1: running command '"C:/PROGRA~1/R/R-32~1.0/bin/x64/R" CMD INSTALL -l "C:\Users\Zambidis Lab\Documents\R\win-library\3.0" C:\Users\ZAMBID~1\AppData\Local\Temp\RtmpU3gtWD/downloaded_packages/GO.db_2.9.0.tar.gz' had status 1 
2: In install.packages(pkgs = pkgs, lib = lib, repos = repos, ...) :
  installation of package ‘GO.db’ had non-zero exit status

For IRanges, you're trying to install a package that requires the "R tools" compilers, which you do not have. 对于IRanges,您正在尝试安装一个需要“ R工具”编译器的软件包,而您没有。

For GO.db, you are unfortunately being affected by a change in the RSQLite package; 对于GO.db,很遗憾,您会受到RSQLite软件包更改的影响。 your options are to either upgrade R to the current release, or install a previous version of RSQLite. 您可以选择将R升级到当前版本,或者安装RSQLite的早期版本。 You could try to install version 0.11.4 of RSQLite, but this will be a problem for the same reason as your installation of IRanges is failing. 您可以尝试安装RSQLite的0.11.4 版本 ,但这是一个问题,与安装IRanges失败的原因相同。

Your best bet is basically to start over with a current version of R, and ALWAYS use source("http://bioconductor.org/biocLite.R") and biocLite() 最好的选择基本上是从当前版本的R重新开始,并且始终使用source("http://bioconductor.org/biocLite.R")biocLite()

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM