r-lib / pak

A fresh approach to package installation
https://pak.r-lib.org
677 stars 63 forks source link

Error when trying the package in the latest rocker image/ error: unable to load shared object '/home/rstudio/.cache/R-pkg/lib/4.0/xml2/libs/xml2.so' #190

Closed rwarnung closed 4 years ago

rwarnung commented 4 years ago

Hi, I wanted to try the package in docker. So I pulled the latet image and started an rstudio session using the following commands in docker: docker run -e PASSWORD=yourpassword --rm -p 8787:8787 rocker/rstudio Then I switched to the browser and worked inside of rstudio. First I installed pakusing install.packages("pak") this worked. Then I tried to install the package pacman first: pak::pkg_install("pacman") when asked to continue I entered "Y". Then the existing packages were copied and finally I got the following error message:

Created private lib in /home/rstudio/.cache/R-pkg/lib/4.0... Error: callr subprocess failed: .onLoad failed in loadNamespace() for 'pak', details: call: dyn.load(file, DLLpath = DLLpath, ...) error: unable to load shared object '/home/rstudio/.cache/R-pkg/lib/4.0/xml2/libs/xml2.so': libxml2.so.2: cannot open shared object file: No such file or directory

Similar problems arise (as expected) when I try to install xgboost. pak::pkg_install("xgboost")

cli message statuscli message status_updatecli message status_updatecli message status_updatecli message status_updatecli message status_updatecli message status_updatecli message status_updatecli message status_updatecli message status_updatecli message status_updatecli message status_updatecli message status_updatecli message status_updatecli message status_clearError: callr subprocess failed: unable to load shared object '/home/rstudio/.cache/R-pkg/lib/4.0/xml2/libs/xml2.so': libxml2.so.2: cannot open shared object file: No such file or directory

gaborcsardi commented 4 years ago

You can install the current dev version like this:

install.packages("pak", repos = "https://r-lib.github.io/p/pak/dev/")

This should work.

jimhester commented 4 years ago

I verified this works with the dev version so I think we can close this.

rwarnung commented 4 years ago

Sorry for the late reply. I can confirm that it works with the dev version. Thank you!