Cmdstan not installing


I’m trying to install cmdstan using cmdstanr. I am using the most up to date version of R and R studio. I have rstan, and cmdstanr installed fine.

The error that occurs after running install_cmdstan(cores = 2) is

Error: Problem extracting tarball. Exited with return code: 1

I also get the warning

In addition: Warning message:
In utils::untar(dest_file, exdir = dir_cmdstan, extras = “–strip-components 1”) :
‘tar.exe -xf “\fileserver02\Staff\lachlanW/.cmdstanr/cmdstan-2.25.0.tar.gz” -C “//fileserver02/Staff/lachlanW/.cmdstanr/cmdstan-2.25.0” --strip-components 1’ returned error code 1

This is my work computer (Windows 10), so I don’t know if it is an access issue, or I have some other global or profile variable set wrong.

Any help would be appreciated.


First thing to check is whether you can use the tar command, since that’s where the error is coming from. What do you get if you run:


I get the below result

tar.exe: Must specify one of -c, -r, -t, -u, -x
[1] 1

Great! Two things to check next, can you install the github version of cmdstanr:


And then run:


Which will check that everything is configured and setup correctly. If there’s an error which the program corrects, try installing cmdstan again like before.

If not, and it says that everything is properly setup, then the next step is to check whether it works when you try to install cmdstan in a local folder (on your computer, rather than on the networked drive). This can be something like your Documents folder or somewhere on the C:/ drive, as long as it’s not on the networked drive. You can specify this install directory via:

install_cmdstan(cores=2, dir = new_install_dir_here)