I am trying to install pagedown on Rstudio Cloud and I get the following error:
Installing package into ‘/home/rstudio-user/R/x86_64-pc-linux-gnu-library/3.5’
(as ‘lib’ is unspecified)
ERROR: dependency ‘websocket’ is not available for package ‘pagedown’
so I tried to install
remotes::install_github('rstudio/websocket')
and I got the following error:
g++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See
make: * [websocket.o] Error 4
ERROR: compilation failed for package ‘websocket’
What I should do to fix it, considering that I am working on Rstudio Cloud?
For reference, this also has been posted on the community
https://community.rstudio.com/t/error-to-install-pagedown-on-rstudio-cloud-g-internal-compiler-error-killed-program-cc1plus/23465
the solution is to install in Rstudio cloud Pagedown from Cran and not from github
@RLesur Given that we don't know when the websocket package will be released to CRAN, I wonder how difficult it would be to switch to httpuv instead. I know you have already experimented with it: https://gist.github.com/RLesur/522e0e7e7b75826e2c9d35bdfcaa1a89
IMO the use of a httpuv server+a browser as a websocket client shouldn't be too difficult.
Just to let you know that I began working on this. It is working but
basically, I used httpuv to make a websocket tunnel to chrome. The code has not change very much
R <-> httpuv server in a chrome browser <-> chrome headless with devtool protocol.
=> Working: https://github.com/cderv/pagedown/tree/no-websocket-package
=> Not working yet: https://github.com/cderv/pagedown/tree/no-websocket-package-headless
For next discussion, I'll open a proper issue and share with a working PR. (unless you want me to share WIP PR)
To run:
devtools::load_all(".")pagedown::chrome_print('https://pagedown.rbind.io/', verbose = TRUE)
Most helpful comment
IMO the use of a httpuv server+a browser as a websocket client shouldn't be too difficult.