Unable to load shared object rstan/libs/x64/rstan.dll

I have installed rstan package in R 4.x and getting this error

Unable to load shared object rstan/libs/x64/rstan.dll
Load library failure: the specified procedure cannot be found.

How to resolve this issue.
Since I am currently working in a restricted environment where I am not able to upload any package. I have to provide the research support team a list of packages to be installed.

1 Like

unfortunately without a more direct access to the system this may be hard to debug. From the .dll I presume this is a Windows system? Could you share which Windows version? The main problem probably is that rstan needs special setup, beyond just calling install.packages, so you would need to convince your support team to completely follow the instructions at Configuring C Toolchain for Windows · stan-dev/rstan Wiki · GitHub

Cmdstanr (Getting started with CmdStanR • cmdstanr) is a bit easier to install, but still needs RTools on Windows and is not on CRAN so might be a bit harder to convince the support team to install it.

Hope you can get Stan running soon.

The best course of action with errors like these is to reinstall rstan from source, it tends to fix a lot of these issues

Thank you. I was wondering is it possible that we need to install the STAN package in that environment additionally so that rstan can work. As it is a closed environment, many default process of Windows may not happen on its own. I will also check if it is possible to configure C toolchain for Windows.