rstudio / renv

renv: Project environments for R.
https://rstudio.github.io/renv/
MIT License
1k stars 152 forks source link

compilation failed for package ‘rhdf5filters’ #741

Closed yanxianl closed 1 year ago

yanxianl commented 3 years ago

Hi,

I have an R project stored in Dropbox which is synced among 3 computers (2 installed with windows10 and 1 installed with ubuntu 20). I had no problems installing project libraries on our Windows computers. When installing a Bioconductor package, biomformat, on ubuntu 20, the package failed to compile. I could install other Bioconductor packages on this ubuntu computer though.

Error messages:

cp: target 'Dropbox/projects/yanxian/Li_AqFl1-Microbiota_2020/renv/library/R-4.0/x86_64-pc-linux-gnu/00LOCK-rhdf5filters/00new/rhdf5filters/lib/' is not a directory make: *** [Makevars:24: copying] Error 1 ERROR: compilation failed for package ‘rhdf5filters’

  • removing ‘/media/md0/nutrition_group Dropbox/projects/yanxian/Li_AqFl1-Microbiota_2020/renv/library/R-4.0/x86_64-pc-linux-gnu/rhdf5filters’ ERROR: dependency ‘rhdf5filters’ is not available for package ‘rhdf5’
  • removing ‘/media/md0/nutrition_group Dropbox/projects/yanxian/Li_AqFl1-Microbiota_2020/renv/library/R-4.0/x86_64-pc-linux-gnu/rhdf5’ ERROR: dependency ‘rhdf5’ is not available for package ‘biomformat’
  • removing ‘/media/md0/nutrition_group Dropbox/projects/yanxian/Li_AqFl1-Microbiota_2020/renv/library/R-4.0/x86_64-pc-linux-gnu/biomformat’
kevinushey commented 3 years ago

Does it work if you try to use renv with a project outside of Dropbox?

yanxianl commented 3 years ago

Yes, it did! I made a copy of my R project outside the Dropbox folder and I was able to install the Bioconductor package. After that, I moved the project back to the Dropbox folder. The package can be run without problems. Thanks for the tip!

kevinushey commented 3 years ago

I'd recommend placing your project library folder somewhere separate from your Dropbox folder. You could do so by placing this in your ~/.Renviron file; e.g. something like:

RENV_PATHS_LIBRARY_ROOT = /media/md0/renv

Tweak that path as appropriate, you'd just want to make sure you're placing your library paths outside of the Dropbox folder.

svillegasv commented 1 year ago

Hello! I`m having the same problem, and im not working on Dropbox. It is ubuntu 22.04.02 LTS. Any suggestions would be appreciated!

hadley commented 1 year ago

@svillegasv can you please file a new issues showing exactly what code you ran and what error you’re seeing?