Thanks to visit codestin.com
Credit goes to github.com

Skip to content

set RGL_USE_NULL=TRUE to avoid install errors for packages depending on rgl #332

@jefferis

Description

@jefferis

remotes upconverts warnings to errors during package install. This causes errors when installing errors for packages with rgl as a dependency in a headless environment (because rgl issues a warning saying that it could not start an X11 session).

> devtools::install_github("jefferislab/nat.templatebrains", force=T)
Downloading GitHub repo jefferislab/nat.templatebrains@master
✔  checking for file ‘/tmp/RtmpMMflXh/remotes2cdfe679557fd/jefferislab-nat.templatebrains-d45884e/DESCRIPTION’ ...
─  preparing ‘nat.templatebrains’:
✔  checking DESCRIPTION meta-information ...
─  checking for LF line-endings in source and make files and shell scripts
─  checking for empty or unneeded directories
─  looking to see if a ‘data/datalist’ file should be added
─  building ‘nat.templatebrains_0.9.tar.gz’
   
Installing package into ‘/home/jefferis/R/x86_64-pc-linux-gnu-library/3.5’
(as ‘lib’ is unspecified)
* installing *source* package ‘nat.templatebrains’ ...
** R
** data
** inst
** byte-compile and prepare package for lazy loading
Error: package or namespace load failed for ‘rgl’:
 .onLoad failed in loadNamespace() for 'rgl', details:
  call: rgl.init(initValue, onlyNULL)
  error: (converted from warning) RGL: unable to open X11 display
Error : package ‘rgl’ could not be loaded
ERROR: lazy loading failed for package ‘nat.templatebrains’
* removing ‘/home/jefferis/R/x86_64-pc-linux-gnu-library/3.5/nat.templatebrains’
* restoring previous ‘/home/jefferis/R/x86_64-pc-linux-gnu-library/3.5/nat.templatebrains’
Error in i.p(...) : 
  (converted from warning) installation of package ‘/tmp/RtmpMMflXh/file2cdfe77d3becc/nat.templatebrains_0.9.tar.gz’ had non-zero exit status

The same package nat.templatebrains installs OK from CRAN.

> install.packages("nat.templatebrains")
Installing package into ‘/home/jefferis/R/x86_64-pc-linux-gnu-library/3.5’
(as ‘lib’ is unspecified)
trying URL 'https://cloud.r-project.org/src/contrib/nat.templatebrains_0.9.tar.gz'
Content type 'application/x-gzip' length 32526 bytes (31 KB)
==================================================
downloaded 31 KB

* installing *source* package ‘nat.templatebrains’ ...
** package ‘nat.templatebrains’ successfully unpacked and MD5 sums checked
** R
** data
** inst
** byte-compile and prepare package for lazy loading
Warning in rgl.init(initValue, onlyNULL) :
  RGL: unable to open X11 display
Warning: 'rgl_init' failed, running with rgl.useNULL = TRUE
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
Warning in rgl.init(initValue, onlyNULL) :
  RGL: unable to open X11 display
Warning: 'rgl_init' failed, running with rgl.useNULL = TRUE
* DONE (nat.templatebrains)

The downloaded source packages are in
	‘/tmp/RtmpMMflXh/downloaded_packages’

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions