trying to install package "bayesrules"

install.packages(bayesrules)
Exits with this error:

Warning in install.packages :
installation of package ‘rstanarm’ had non-zero exit status

I tried installing 'rstanarm' separately and it exits with the same error.

Appreciate any help

1 Like

If you see

A binary version is available but a source version is later

and have been choosing the “Yes” option, try “No

Can you copy here the complete output of

install.packages(bayesrules)

? Thanks!

Thanks for your help...

install.packages("bayesrules")
Installing package into ‘/cloud/lib/x86_64-pc-linux-gnu-library/4.3’
(as ‘lib’ is unspecified)
also installing the dependencies ‘fs’, ‘diffobj’, ‘rematch2’, ‘rappdirs’, ‘highr’, ‘tinytex’, ‘numDeriv’, ‘brio’, ‘evaluate’, ‘pkgload’, ‘praise’, ‘ps’, ‘waldo’, ‘memoise’, ‘sass’, ‘yaml’, ‘knitr’, ‘rmarkdown’, ‘lazyeval’, ‘colorspace’, ‘abind’, ‘tensorA’, ‘distributional’, ‘testthat’, ‘callr’, ‘crayon’, ‘prettyunits’, ‘processx’, ‘rprojroot’, ‘httpuv’, ‘mime’, ‘jsonlite’, ‘fontawesome’, ‘htmltools’, ‘sourcetools’, ‘later’, ‘promises’, ‘fastmap’, ‘commonmark’, ‘bslib’, ‘cachem’, ‘ellipsis’, ‘htmlwidgets’, ‘miniUI’, ‘crosstalk’, ‘jquerylib’, ‘zoo’, ‘xfun’, ‘digest’, ‘igraph’, ‘base64enc’, ‘farver’, ‘labeling’, ‘munsell’, ‘RColorBrewer’, ‘viridisLite’, ‘fansi’, ‘pkgconfig’, ‘timechange’, ‘cpp11’, ‘utf8’, ‘ggridges’, ‘posterior’, ‘reshape2’, ‘minqa’, ‘nloptr’, ‘matrixStats’, ‘inline’, ‘gridExtra’, ‘pkgbuild’, ‘desc’, ‘shiny’, ‘colourpicker’, ‘DT’, ‘dygraphs’, ‘gtools’, ‘markdown’, ‘shinyjs’, ‘shinythemes’, ‘threejs’, ‘xtable’, ‘xts’, ‘backports’, ‘cli’, ‘glue’, ‘gtable’, ‘isoband’, ‘lifecycle’, ‘rlang’, ‘scales’, ‘tibble’, ‘vctrs’, ‘withr’, ‘hms’, ‘lubridate’, ‘stringi’, ‘stringr’, ‘snakecase’, ‘tidyselect’, ‘tidyr’, ‘generics’, ‘pillar’, ‘R6’, ‘Rcpp’, ‘bayesplot’, ‘lme4’, ‘loo’, ‘rstan’, ‘rstantools’, ‘shinystan’, ‘RcppParallel’, ‘StanHeaders’, ‘BH’, ‘RcppEigen’, ‘proxy’, ‘checkmate’, ‘numbers’, ‘plyr’, ‘rearrr’, ‘ggplot2’, ‘janitor’, ‘magrittr’, ‘dplyr’, ‘purrr’, ‘rstanarm’, ‘e1071’, ‘groupdata2’

  • installing binary package ‘fs’ ...
  • DONE (fs)
  • installing binary package ‘rappdirs’ ...
  • DONE (rappdirs)
  • installing binary package ‘numDeriv’ ...
  • DONE (numDeriv)
  • installing binary package ‘brio’ ...
  • DONE (brio)
  • installing binary package ‘evaluate’ ...
  • DONE (evaluate)
  • installing binary package ‘praise’ ...
  • DONE (praise)
  • installing binary package ‘ps’ ...
  • DONE (ps)
  • installing binary package ‘yaml’ ...
  • DONE (yaml)
  • installing binary package ‘lazyeval’ ...
  • DONE (lazyeval)
  • installing binary package ‘colorspace’ ...
  • DONE (colorspace)
  • installing binary package ‘abind’ ...
  • DONE (abind)
  • installing binary package ‘tensorA’ ...
  • DONE (tensorA)
  • installing binary package ‘crayon’ ...
  • DONE (crayon)
  • installing binary package ‘prettyunits’ ...
  • DONE (prettyunits)
  • installing binary package ‘rprojroot’ ...
  • DONE (rprojroot)
  • installing binary package ‘mime’ ...
  • DONE (mime)
  • installing binary package ‘jsonlite’ ...
  • DONE (jsonlite)
  • installing binary package ‘sourcetools’ ...
  • DONE (sourcetools)
  • installing binary package ‘fastmap’ ...
  • DONE (fastmap)
  • installing binary package ‘commonmark’ ...
  • DONE (commonmark)
  • installing binary package ‘zoo’ ...
  • DONE (zoo)
  • installing binary package ‘xfun’ ...
  • DONE (xfun)
  • installing binary package ‘digest’ ...
  • DONE (digest)
  • installing binary package ‘base64enc’ ...
  • DONE (base64enc)
  • installing binary package ‘farver’ ...
  • DONE (farver)
  • installing binary package ‘labeling’ ...
  • DONE (labeling)
  • installing binary package ‘RColorBrewer’ ...
  • DONE (RColorBrewer)
  • installing binary package ‘viridisLite’ ...
  • DONE (viridisLite)
  • installing binary package ‘fansi’ ...
  • DONE (fansi)
  • installing binary package ‘pkgconfig’ ...
  • DONE (pkgconfig)
  • installing binary package ‘cpp11’ ...
  • DONE (cpp11)
  • installing binary package ‘utf8’ ...
  • DONE (utf8)
  • installing binary package ‘matrixStats’ ...
  • DONE (matrixStats)
  • installing binary package ‘inline’ ...
  • DONE (inline)
  • installing binary package ‘gtools’ ...
  • DONE (gtools)
  • installing binary package ‘xtable’ ...
  • DONE (xtable)
  • installing binary package ‘backports’ ...
  • DONE (backports)
  • installing binary package ‘cli’ ...
  • DONE (cli)
  • installing binary package ‘glue’ ...
  • DONE (glue)
  • installing binary package ‘isoband’ ...
  • DONE (isoband)
  • installing binary package ‘rlang’ ...
  • DONE (rlang)
  • installing binary package ‘withr’ ...
  • DONE (withr)
  • installing binary package ‘stringi’ ...
  • DONE (stringi)
  • installing binary package ‘generics’ ...
  • DONE (generics)
  • installing binary package ‘R6’ ...
  • DONE (R6)
  • installing binary package ‘Rcpp’ ...
  • DONE (Rcpp)
  • installing binary package ‘RcppParallel’ ...
  • DONE (RcppParallel)
  • installing binary package ‘BH’ ...
  • DONE (BH)
  • installing binary package ‘proxy’ ...
  • DONE (proxy)
  • installing binary package ‘numbers’ ...
  • DONE (numbers)
  • installing binary package ‘magrittr’ ...
  • DONE (magrittr)
  • installing binary package ‘diffobj’ ...
  • DONE (diffobj)
  • installing binary package ‘highr’ ...
  • DONE (highr)
  • installing binary package ‘tinytex’ ...
  • DONE (tinytex)
  • installing binary package ‘processx’ ...
  • DONE (processx)
  • installing binary package ‘later’ ...
  • DONE (later)
  • installing binary package ‘cachem’ ...
  • DONE (cachem)
  • installing binary package ‘ellipsis’ ...
  • DONE (ellipsis)
  • installing binary package ‘igraph’ ...
  • DONE (igraph)
  • installing binary package ‘munsell’ ...
  • DONE (munsell)
  • installing binary package ‘timechange’ ...
  • DONE (timechange)
  • installing binary package ‘minqa’ ...
  • DONE (minqa)
  • installing binary package ‘desc’ ...
  • DONE (desc)
  • installing binary package ‘markdown’ ...
  • DONE (markdown)
  • installing binary package ‘xts’ ...
  • DONE (xts)
  • installing binary package ‘lifecycle’ ...
  • DONE (lifecycle)
  • installing binary package ‘RcppEigen’ ...
  • DONE (RcppEigen)
  • installing binary package ‘checkmate’ ...
  • DONE (checkmate)
  • installing binary package ‘plyr’ ...
  • DONE (plyr)
  • installing binary package ‘e1071’ ...
  • DONE (e1071)
  • installing binary package ‘pkgload’ ...
  • DONE (pkgload)
  • installing binary package ‘memoise’ ...
  • DONE (memoise)
  • installing binary package ‘knitr’ ...
  • DONE (knitr)
  • installing binary package ‘callr’ ...
  • DONE (callr)
  • installing binary package ‘htmltools’ ...
  • DONE (htmltools)
  • installing binary package ‘promises’ ...
  • DONE (promises)
  • installing binary package ‘gtable’ ...
  • DONE (gtable)
  • installing binary package ‘scales’ ...
  • DONE (scales)
  • installing binary package ‘vctrs’ ...
  • DONE (vctrs)
  • installing binary package ‘lubridate’ ...
  • DONE (lubridate)
  • installing binary package ‘loo’ ...
  • DONE (loo)
  • installing binary package ‘rstantools’ ...
  • DONE (rstantools)
  • installing binary package ‘StanHeaders’ ...
  • DONE (StanHeaders)
  • installing binary package ‘sass’ ...
  • DONE (sass)
  • installing binary package ‘httpuv’ ...
  • DONE (httpuv)
  • installing binary package ‘fontawesome’ ...
  • DONE (fontawesome)
  • installing binary package ‘crosstalk’ ...
  • DONE (crosstalk)
  • installing binary package ‘jquerylib’ ...
  • DONE (jquerylib)
  • installing binary package ‘gridExtra’ ...
  • DONE (gridExtra)
  • installing binary package ‘pkgbuild’ ...
  • DONE (pkgbuild)
  • installing binary package ‘hms’ ...
  • DONE (hms)
  • installing binary package ‘stringr’ ...
  • DONE (stringr)
  • installing binary package ‘tidyselect’ ...
  • DONE (tidyselect)
  • installing binary package ‘pillar’ ...
  • DONE (pillar)
  • installing binary package ‘purrr’ ...
  • DONE (purrr)
  • installing binary package ‘bslib’ ...
  • DONE (bslib)
  • installing binary package ‘reshape2’ ...
  • DONE (reshape2)
  • installing binary package ‘tibble’ ...
  • DONE (tibble)
  • installing binary package ‘snakecase’ ...
  • DONE (snakecase)
  • installing binary package ‘rematch2’ ...
  • DONE (rematch2)
  • installing binary package ‘rmarkdown’ ...
  • DONE (rmarkdown)
  • installing binary package ‘shiny’ ...
  • DONE (shiny)
  • installing binary package ‘ggplot2’ ...
  • DONE (ggplot2)
  • installing binary package ‘dplyr’ ...
  • DONE (dplyr)
  • installing binary package ‘waldo’ ...
  • DONE (waldo)
  • installing binary package ‘distributional’ ...
  • DONE (distributional)
  • installing binary package ‘htmlwidgets’ ...
  • DONE (htmlwidgets)
  • installing binary package ‘miniUI’ ...
  • DONE (miniUI)
  • installing binary package ‘ggridges’ ...
  • DONE (ggridges)
  • installing binary package ‘shinyjs’ ...
  • DONE (shinyjs)
  • installing binary package ‘shinythemes’ ...
  • DONE (shinythemes)
  • installing binary package ‘tidyr’ ...
  • DONE (tidyr)
  • installing binary package ‘rstan’ ...
  • DONE (rstan)
  • installing binary package ‘rearrr’ ...
  • DONE (rearrr)
  • installing binary package ‘testthat’ ...
  • DONE (testthat)
  • installing binary package ‘posterior’ ...
  • DONE (posterior)
  • installing binary package ‘colourpicker’ ...
  • DONE (colourpicker)
  • installing binary package ‘DT’ ...
  • DONE (DT)
  • installing binary package ‘dygraphs’ ...
  • DONE (dygraphs)
  • installing binary package ‘threejs’ ...
  • DONE (threejs)
  • installing binary package ‘janitor’ ...
  • DONE (janitor)
  • installing binary package ‘groupdata2’ ...
  • DONE (groupdata2)
  • installing binary package ‘nloptr’ ...
  • DONE (nloptr)
  • installing binary package ‘bayesplot’ ...
  • DONE (bayesplot)
  • installing binary package ‘lme4’ ...
  • DONE (lme4)
  • installing binary package ‘shinystan’ ...
  • DONE (shinystan)
  • installing source package ‘rstanarm’ ...
    ** package ‘rstanarm’ successfully unpacked and MD5 sums checked
    ** using staged installation
    ** libs
    using C++ compiler: ‘g++ (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0’
    using C++17
    "/opt/R/4.3.0/lib/R/bin/Rscript" -e "source(file.path('..', 'tools', 'make_cc.R')); make_cc(commandArgs(TRUE))" stan_files/jm.stan
    Wrote C++ file "stan_files/jm.cc"

g++ -std=gnu++17 -I"/opt/R/4.3.0/lib/R/include" -DNDEBUG -I"../inst/include" -I"/cloud/lib/x86_64-pc-linux-gnu-library/4.3/StanHeaders/include/src" -DBOOST_DISABLE_ASSERTS -DEIGEN_NO_DEBUG -DBOOST_MATH_OVERFLOW_ERROR_POLICY=errno_on_error -D_HAS_AUTO_PTR_ETC=0 -I'/cloud/lib/x86_64-pc-linux-gnu-library/4.3/StanHeaders/include' -I'/cloud/lib/x86_64-pc-linux-gnu-library/4.3/rstan/include' -I'/cloud/lib/x86_64-pc-linux-gnu-library/4.3/BH/include' -I'/cloud/lib/x86_64-pc-linux-gnu-library/4.3/Rcpp/include' -I'/cloud/lib/x86_64-pc-linux-gnu-library/4.3/RcppEigen/include' -I'/cloud/lib/x86_64-pc-linux-gnu-library/4.3/RcppParallel/include' -I/usr/local/include -I'/cloud/lib/x86_64-pc-linux-gnu-library/4.3/RcppParallel/include' -D_REENTRANT -DSTAN_THREADS -D_HAS_AUTO_PTR_ETC=0 -fpic -g -O2 -c stan_files/jm.cc -o stan_files/jm.o
g++: fatal error: Killed signal terminated program cc1plus
compilation terminated.
make: *** [/opt/R/4.3.0/lib/R/etc/Makeconf:198: stan_files/jm.o] Error 1
rm stan_files/jm.cc
ERROR: compilation failed for package ‘rstanarm’

  • removing ‘/cloud/lib/x86_64-pc-linux-gnu-library/4.3/rstanarm’
    Warning in install.packages :
    installation of package ‘rstanarm’ had non-zero exit status
  • installing binary package ‘bayesrules’ ...
  • DONE (bayesrules)

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

This seems like the Out-Of-Memory killer. C++ compilation often needs a lot of memory. How much memory do you have? Can you use a swap file?

Memory = 1G
I installed on a different VM with 4G -- no problem.

Thanks for your help!

1 Like

I don’t have the metrics to back up my hunch, but that seems too stingy to work very well for anything other than just familiarization use of R in general, let alone any heavy duty compilation work, given that the VM has other demands that reduce how much of the 1GB is available.

This topic was automatically closed 42 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.