I am trying to install CmdStan
(2.36.0) in an Apptainer container based on the Docker image rocker/r-base:4.4.1
. I download the .tar.gz
from source using wget
and then use make
to build it:
export CMDSTAN=“/opt/cmdstan”
mkdir -p ${CMDSTAN}
cd /opt/ &&
wget https://github.com/stan-dev/cmdstan/releases/download/v2.36.0/cmdstan-2.36.0-linux-arm64.tar.gz
tar -xvf \
cmdstan-2.36.0-linux-arm64.tar.gz \
--no-same-owner --no-same-permissions
mv /opt/cmdstan-2.36.0/* ${CMDSTAN}
cd ${CMDSTAN}
make build
After a while, I finally get:
--- CmdStan v2.36.0 built —
However, when I run
make examples/bernoulli/bernoulli
I get the following error:
--- Translating Stan model to C++ code ---
bin/stanc --o=examples/bernoulli/bernoulli.hpp examples/bernoulli/bernoulli.stan
bash: line 1: bin/stanc: cannot execute binary file: Exec format error
make: *** [make/program:66: examples/bernoulli/bernoulli.hpp] Error 126
Any hints on what is going on and (hopefully) how to fix it?
- Operating System: Debian GNU/Linux trixie/sid
- CmdStan Version: 2.36.0
- Compiler/Toolkit: GCC 13.2.0