Question: GO.db installation fails (MacOS, AnnotationDbi, R3.5.0)
gravatar for Jens Preussner
9 months ago by
Jens Preussner30 wrote:

Hi all,

I'm trying to install GO.db on Mac OS X with R3.5.0 and Bioconductor 3.7.0:

> library(AnnotationDbi)
Loading required package: stats4
Loading required package: BiocGenerics
Loading required package: parallel

Attaching package: ‘BiocGenerics’

The following objects are masked from ‘package:parallel’:

    clusterApply, clusterApplyLB, clusterCall, clusterEvalQ, clusterExport, clusterMap, parApply, parCapply, parLapply, parLapplyLB, parRapply, parSapply,

The following objects are masked from ‘package:stats’:

    IQR, mad, sd, var, xtabs

The following objects are masked from ‘package:base’:

    anyDuplicated, append,, basename, cbind, colMeans, colnames, colSums, dirname,, duplicated, eval, evalq, Filter, Find, get, grep, grepl,
    intersect, is.unsorted, lapply, lengths, Map, mapply, match, mget, order, paste, pmax,, pmin,, Position, rank, rbind, Reduce, rowMeans,
    rownames, rowSums, sapply, setdiff, sort, table, tapply, union, unique, unsplit, which, which.max, which.min

Loading required package: Biobase
Welcome to Bioconductor

    Vignettes contain introductory material; view with 'browseVignettes()'. To cite Bioconductor, see 'citation("Biobase")', and for packages

Loading required package: IRanges
Loading required package: S4Vectors

Attaching package: ‘S4Vectors’

The following object is masked from ‘package:base’:

> biocLite("GO.db")
Using Bioconductor 3.7 (BiocInstaller 1.30.0), R 3.5.0 (2018-04-23).
Installing package(s) ‘GO.db’
installing the source package ‘GO.db’

trying URL ''
Content type 'application/x-gzip' length 31763273 bytes (30.3 MB)
downloaded 30.3 MB

* installing *source* package ‘GO.db’ ...
** R
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
Error : package ‘AnnotationDbi’ required by ‘GO.db’ could not be found
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/Users/jpreuss/Library/R/3.5/library/GO.db’

The downloaded source packages are in
Warning message:
In install.packages(pkgs = doing, lib = lib, ...) :
  installation of package ‘GO.db’ had non-zero exit status

I tried specifying lib.loc and installing via R CMD INSTALL, but both failed with the same error. Also installing other annotation packages, like BSgenome.Mmusculus.UCSC.mm10 fail for me. There is no traceback() available.

Any ideas? Many thanks, Jens

R version 3.5.0 (2018-04-23)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS Sierra 10.12.6

Matrix products: default
BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.5/Resources/lib/libRlapack.dylib

[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

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

other attached packages:
[1] AnnotationDbi_1.42.1 IRanges_2.14.10      S4Vectors_0.18.2     Biobase_2.40.0       BiocGenerics_0.26.0  BiocInstaller_1.30.0

loaded via a namespace (and not attached):
 [1] Rcpp_0.12.17   digest_0.6.15  DBI_1.0.0      RSQLite_2.1.1  blob_1.1.1     tools_3.5.0    bit64_0.9-7    bit_1.1-14     compiler_3.5.0 memoise_1.1.0
ADD COMMENTlink modified 9 months ago by Martin Morgan ♦♦ 23k • written 9 months ago by Jens Preussner30
Answer: GO.db installation fails (MacOS, AnnotationDbi, R3.5.0)
gravatar for Martin Morgan
9 months ago by
Martin Morgan ♦♦ 23k
United States
Martin Morgan ♦♦ 23k wrote:

Did you try to install the missing dependency (this shouldn't usually be necessary, but that is what R says is the problem...)?

biocLite("AnnotationDbi")  # if this is successful, then...

(Usually one could install multiple packages via biocLite(c("AnnotationDbi", "GO.db")), but since you're having trouble let's do things one step at a time...)

ADD COMMENTlink written 9 months ago by Martin Morgan ♦♦ 23k

Thanks for your reply. AnnotationDbi installation is successful, but GO.db fails afterwards with the error message seen above.

ADD REPLYlink modified 9 months ago • written 9 months ago by Jens Preussner30

Can you investigate where AnnotationDbi is installed, e.g., looking at something like

sapply(.libPaths(), function(elt) "AnnotationDbi" %in% dir(elt))

I don't really know where this will lead, but I would guess that you have two or more .libPaths(), that AnnotationDbi is in a path different from the location (probably the first entry in .libPaths()) where GO.db is being installed.

Another approach might first remove AnnotationDbi (via remove.packages("AnnotationDbi"), repeated until R says there is no package to remove) and then (in a new session) install it again...

A different tack might be to try to install GO.db without testing that it can be loaded, and one installed in a new session try to load -- exploring the idea that the libPaths() at installation are different from the run-time installation. This could be done at the command line with

R CMD INSTALL --no-test-load GO.db_...

or from within R with

biocLite("GO.db", INSTALL_opts = "--no-test-load")
ADD REPLYlink written 9 months ago by Martin Morgan ♦♦ 23k

Thats great! Thank you for your time and effort. R CMD INSTALL --no-test-load GO.db_... did the trick! Who knows why the .libPaths() are different between installation and run time, but it worked now. Thanks again for your help! Highly appreciated!

ADD REPLYlink modified 9 months ago • written 9 months ago by Jens Preussner30

Glad that worked, can you provide me with the output of .libPaths() and sapply(.libPaths(), function(elt) "AnnotationDbi" %in% dir(elt)) ? it will help to debug this further.

ADD REPLYlink modified 9 months ago • written 9 months ago by Martin Morgan ♦♦ 23k
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 219 users visited in the last hour