Laplace approximation in STAN - Need help in debug the issue

Hi ,
I use @charlesm93 tool to work with Laplace approximation in STAN on Linux server (Ubuntu 20.04.3 LTS).
When I run bash file “” : StanCon2020/ at master · charlesm93/StanCon2020 · GitHub
I am able to run most of the code, but can’t run the last line Bernoulli example "“STANC3=…/stanc3 make examples/bernoulli/bernoulli”
I get following error :
“cp: cannot stat ‘…/stanc3/_build/default/src/stanc/stanc.exe’: No such file or directory
make: *** [make/stanc:54: bin/stanc] Error 1”

Could you please help in this regard.
Looking very much forward to hear from you.

Best Regards,


Sorry about the delay. Down on Post #14 (FYI it’s for a Windows system)

You can see two ways you can get stanc installed. Maybe those will help?

I got similar problem so I tried ran bash commands by hand, not by bash file. I got error:

r: creating stan/lib/stan_math/lib/sundials_5.2.0/lib/libsundials_kinsol.a
cd ../stanc3 && echo "--- Rebuilding stanc ---\n" && dune build @install
--- Rebuilding stanc ---\n
/bin/bash: dune: command not found
make: *** [make/stanc:53: bin/stanc] Error 127

I installed dune with command

apt-get install dune

However later I got error:

cd ../stanc3 && echo "--- Rebuilding stanc ---\n" && dune build @install
--- Rebuilding stanc ---\n
Error: Program ocamlc not found in the tree or in PATH
 (context: default)
make: *** [make/stanc:53: bin/stanc] Error 1

then install ocalm:

apt install ocaml

After this I get similar error:

--- Rebuilding stanc ---\n
test -f ../stanc3/_build/default/src/stanc/stanc.exe && rm -f bin/stanc && cp ../stanc3/_build/default/src/stanc/stanc.exe bin/stanc || exit 1
make: *** [make/stanc:54: bin/stanc] Error 1

However, I am using ubuntu not windows and installing curl does not help.