0
3.3 years ago by
European Union
Lluís Revilla Sancho510 wrote:

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.
'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)
==================================================

* installing *source* package ‘arrayQualityMetrics’ ...
** R
** inst
Creating a generic function for ‘boxplot’ from package ‘graphics’ in package ‘affyPLM’
Creating a generic function for ‘hist’ from package ‘graphics’ in package ‘affyPLM’
* removing ‘/home/lrevilla/R/x86_64-pc-linux-gnu-library/3.3/arrayQualityMetrics’

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")
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).
Content type 'unknown' length 2486005 bytes (2.4 MB)
==================================================

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

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
[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


modified 12 weeks ago • written 3.3 years ago by Lluís Revilla Sancho510
1

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.

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.

0
12 weeks ago by
European Union
Lluís Revilla Sancho510 wrote:

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.