3

I've installed R-devel on Ubuntu following this guide. When trying to install magrittr with install.packages("magrittr") I'm getting this:

* installing *source* package ‘magrittr’ ...
** package ‘magrittr’ successfully unpacked and MD5 sums checked
** R
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded
Error in get(name, envir = asNamespace(pkg), inherits = FALSE) : 
  object 'checkCompilerOptions' not found
Calls: ::: -> get
Execution halted
ERROR: loading failed
* removing ‘/usr/local/lib/R/site-library/magrittr’

The downloaded source packages are in
    ‘/tmp/RtmpagwvBj/downloaded_packages’
Warning message:
In install.packages("magrittr") :
  installation of package ‘magrittr’ had non-zero exit status

The single other stackoverflow question refering to this error didn't help me. Can anyone help?

What I'm really trying to do is to install the latest development version of the Gviz package. In order to do that I must use the development version of bioconductor and R. Down in the dependency tree for Gviz comes magrittr.

My sessionInfo():

R Under development (unstable) (2016-02-18 r70185)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 15.10

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
 [3] LC_TIME=nb_NO.UTF-8        LC_COLLATE=en_US.UTF-8    
 [5] LC_MONETARY=nb_NO.UTF-8    LC_MESSAGES=en_US.UTF-8   
 [7] LC_PAPER=nb_NO.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=nb_NO.UTF-8 LC_IDENTIFICATION=C       

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

loaded via a namespace (and not attached):
[1] tools_3.3.0 tcltk_3.3.0
Community
  • 1
  • 1
L42
  • 3,052
  • 4
  • 28
  • 49
  • `checkCompilerOptions` seems to be from the compiler package. Is there anything in your .Rprofile or otherwise that references the compiler? You could try adding `options(error=traceback)` to your .Rprofile to get a sense of the function calls leading to the error. – Martin Morgan Feb 19 '16 at 11:29
  • Thank you for answering. I have nothing in my .Rprofile at all, and adding (or using) `options(error=traceback)` didn't produce a different output. – L42 Feb 19 '16 at 11:41

2 Answers2

2

I had the same problem installing the raster package. I found out here that the problem was a conflict between library directories exported by the second script of the guide you are mentionning:

#!/bin/bash
export R_LIBS_SITE=${R_LIBS_SITE-'/usr/lib/R-devel/lib/R/library:/usr/local/lib/R/site-library:/usr/lib/R/site-library::/usr/lib/R/library'}
export PATH="/usr/local/lib/R-devel/bin:$PATH"
R "$@"

So I removed the library folders not related to my R-devel instance:

#!/bin/bash
export R_LIBS_SITE=${R_LIBS_SITE-'/usr/lib/R-devel/lib/R/library:/usr/local/lib/R/site-library'}
export PATH="/usr/local/lib/R-devel/bin:$PATH"
R "$@"

And it finally worked.

rCarto
  • 21
  • 3
  • Thank for your answer. I'm unable to test this for a while, but if another person says that this made it work for them (indicating that it's a good solution) I'll accept your answer instead! – L42 Mar 29 '16 at 12:07
1

I was able to install Gviz! This is what got me there:

  1. I tried using devtools::install_github("Bioconductor-mirror/Gviz") to install Gviz instead of doing it with biocLite("Gviz"). This got me the checkCompilerOptions error, but now with the package matrixStats.
  2. I installed matrixStats using devtools::install_github("HenrikBengtsson/matrixStats"). This worked.
  3. At this point I tried installing magrittr again, using install.packages("magrittr"). It worked somehow!
  4. I could now install Gviz with devtools::install_github("Bioconductor-mirror/Gviz")

I still have no idea about the checkCompilerOptions error, and would appreciate any ideas.

L42
  • 3,052
  • 4
  • 28
  • 49