Bioconductor / BiocManager

CRAN Package For Managing Bioconductor Packages
http://bioconductor.github.io/BiocManager/
72 stars 22 forks source link

Local path install prompt not usable #158

Closed rbutleriii closed 1 year ago

rbutleriii commented 1 year ago

When installing to a local dir, BiocManager doesn't point to the default $HOME/R/... for a personal library, nor does it prompt you to enter in a personal library path. I can specify the lib well enough beforehand, but that makes the prompt pointless.

> BiocManager::install("progeny")
Bioconductor version 3.14 (BiocManager 1.30.19), R 4.1.2 (2021-11-01)
Installing package(s) 'progeny'
Warning in install.packages(...) :
  'lib = "/scg/apps/software/r/4.1.2/lib"' is not writable
Would you like to use a personal library instead? (yes/No/cancel) yes
trying URL 'https://bioconductor.org/packages/3.14/bioc/src/contrib/progeny_1.16.0.tar.gz'
Content type 'application/octet-stream' length 11466936 bytes (10.9 MB)
==================================================
downloaded 10.9 MB

Error: ERROR: no permission to install to directory ‘/scg/apps/software/r/4.1.2/lib’
LiNk-NY commented 1 year ago

We do not have much control over the install.packages behavior. You should get a prompt (if running interactively) to create a personal library, e.g. :

Would you like to create a personal library
'/home/rstudio/R/x86_64-pc-linux-gnu-library/4.1'
to install packages into? (yes/No/cancel) y

If you're running non-interactive, then make sure that the folder is write-able before installing packages.

mtmorgan commented 1 year ago

It would be good to get a fully reproducible example (maybe using tempfile() & libPaths() to configure something appropriate?), but doesn't install.packages() 'do the right thing' when respondingto the prompt, i.e., creating a personal library and using that for installation, where BiocManager seems to be trying to install into the original directory?

rbutleriii commented 1 year ago

In trying to reproduce on a different system it is a system issue. The system has Lmod configured to point to a location for R_LIBS_USER that is not writable, so bioconductor asks for a yes/no, but already has the lib destination defined.