Installing arrayQualityMetrics: ERROR: lazy loading failed
1
0
Entering edit mode
@lluis-revilla-sancho
Last seen 13 days ago
European Union

I had some problems installing arrayQualityMetrics, just in case anyone find it useful, I post it here the steps I did:

I tried installing the package arrayQualityMetrics as following:

$ sudo R --vanilla                                                                                     [ 2:03]

R version 3.3.0 (2016-05-03) -- "Supposedly Educational"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

  Natural language support but running in an English locale

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library("arrayQualityMetrics")
Error in library("arrayQualityMetrics") :
  there is no package called ‘arrayQualityMetrics’
> biocLite("arrayQualityMetrics")
Error: could not find function "biocLite"
> library("BiocInstaller")
Bioconductor version 3.3 (BiocInstaller 1.22.3), ?biocLite for help
> biocLite("arrayQualityMetrics")
BioC_mirror: https://bioconductor.org
Using Bioconductor 3.3 (BiocInstaller 1.22.3), R 3.3.0 (2016-05-03).
Installing package(s) ‘arrayQualityMetrics’
trying URL 'https://bioconductor.org/packages/3.3/bioc/src/contrib/arrayQualityMetrics_3.28.2.tar.gz'
Content type 'unknown' length 601481 bytes (587 KB)
==================================================
downloaded 587 KB

* installing *source* package ‘arrayQualityMetrics’ ...
** R
** inst
** preparing package for lazy loading
Creating a generic function for ‘boxplot’ from package ‘graphics’ in package ‘affyPLM’
Creating a generic function for ‘hist’ from package ‘graphics’ in package ‘affyPLM’
Error in readRDS(mapfile) : error reading from connection
ERROR: lazy loading failed for package ‘arrayQualityMetrics’
* removing ‘/home/lrevilla/R/x86_64-pc-linux-gnu-library/3.3/arrayQualityMetrics’

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

I thought I had all the other dependencies, but by importing each one I found that beadarray reproduce the same error (I don't know why):

>library("beadarray")
Loading required package: ggplot2
Error in readRDS(mapfile) : error reading from connection
Error: package or namespace load failed for ‘beadarray’

Which when I try to install I get the following error:

BioC_mirror: https://bioconductor.org
Using Bioconductor 3.3 (BiocInstaller 1.22.3), R 3.3.0 (2016-05-03).
Installing package(s) ‘beadarray’
trying URL 'https://bioconductor.org/packages/3.3/bioc/src/contrib/beadarray_2.22.2.tar.gz'
Content type 'unknown' length 2486005 bytes (2.4 MB)
==================================================
downloaded 2.4 MB

ERROR: failed to lock directory ‘/home/lrevilla/R/x86_64-pc-linux-gnu-library/3.3’ for modifying
Try removing ‘/home/lrevilla/R/x86_64-pc-linux-gnu-library/3.3/00LOCK-beadarray’

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

I found out that I could do the following command:

biocLite("beadarray", dependencies=TRUE, INSTALL_opts = c('--no-lock'))

Which after a long installation and several compilations the beadarray package is installed. After that a simple biocLite("arrayQualityMetrics") worked.

R version 3.3.0 (2016-05-03)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 14.04.4 LTS

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

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

other attached packages:
[1] BiocInstaller_1.22.3

loaded via a namespace (and not attached):
[1] tools_3.3.0

arrayqualitymetrics beadarray • 2.7k views
ADD COMMENT
1
Entering edit mode

I removed the typo biocLitey() from your example, which I guess is a common error but doesn't speak to the problem you're trying to help others with!

library(BiocInstaller) is a perfectly reasonable thing to do; it is what source("https://bioconductor.org/biocLite.R") does when BiocInstaller is already installed. As general advice, it is (at the moment; it is not good practice to source files from the internet) more reliable to evaluate

source("https://bioconductor.org/biocLite.R")

and then biocLite() is available.

Usually the lock problem is because a previous installation (of the beadarray package, in this case) failed in an unexpected way. A simpler solution is to troubleshoot the reason for the failure, then use operating system or R commands to follow the advice to

Try removing ‘/home/lrevilla/R/x86_64-pc-linux-gnu-library/3.3/00LOCK-beadarray’

For instance, unlink("/home/lrevilla/R/x86_64-pc-linux-gnu-library/3.3/00LOCK-beadarray"). Then re-install beadarray in the usual fashion

biocLite("beadarray")

This will be much easier than re-installing all dependencies. Of course if this fails then one would 'drill down' to the underlying problem, and at some point one might wish to do as you did, forcing re-installation of all dependencies.

ADD REPLY
0
Entering edit mode

Thanks for correcting the typo!
I didn't wanted to mess with locks, and I didn't thought about unlink but thank you for pointing it out.

ADD REPLY
0
Entering edit mode
@lluis-revilla-sancho
Last seen 13 days ago
European Union

As it seems that this question is getting lots of views I think (I'm not sure now) that I followed the recommendation of Martin of removing the locked files.

ADD COMMENT

Login before adding your answer.

Traffic: 650 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6