Installing rstan on RHEL 7.6

I’m unable to install rstan under RHEL 7.6 using the following command:

remotes::install_github("stan-dev/rstan", ref = "develop", subdir = "rstan/rstan", build_opts = "")

I receive the following error message:

remotes::install_github(“stan-dev/rstan”, ref = “develop”, subdir = “rstan/rstan”, build_opts = “”)
Downloading GitHub repo stan-dev/rstan@develop
? checking for file ?/tmp/RtmpBYf1An/remotes2c495935ad9f/stan-dev-rstan-b7b3e46/rstan/rstan/DESCRIPTION? …
? preparing ?rstan?:
? checking DESCRIPTION meta-information …
? cleaning src
? installing the package to build vignettes
E creating vignettes (5m 39.4s)
Creating a ‘stanmodel’ object beta_binomial
Warning in system(cmd, intern = !verbose) :
running command ‘/usr/lib64/R/bin/R CMD SHLIB file6778272bf73f.cpp 2> file6778272bf73f.cpp.err.txt’ had status 1
Quitting from lines 20-45 (SBC.Rmd)
Quitting from lines 20-45 (SBC.Rmd)
Error: processing vignette ‘SBC.Rmd’ failed with diagnostics:
invalid connection
Execution halted
Error in (function (command = NULL, args = character(), error_on_status = TRUE, :
System command error

I can install rstan from CRAN, but then the 8 schools example doesn’t compile, providing an error message that it can’t find StanHeaders.

Hey, have you figured out the solution? I encountered a similar error.

Was that installing from github or CRAN? If github then if you’re using argument build_opts="" I would try removing the build_opts argument entirely.

sorry it was using check_win_devel to check my own package and I got a similar warning: “Error: processing vignette ‘…Rmd’ failed with diagnostics:
invalid connection”, so I guess it’s not a rstan issue, although I used some rstan in some of my functions