# Installing Rstan

**URL:** <https://discourse.mc-stan.org/t/installing-rstan/20743>\
**Category:** Interfaces\
**Created:** [February 11, 2021, 8:52am UTC](https://discourse.mc-stan.org/t/installing-rstan/20743 "2021-02-11T08:52:10Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![andrjohns](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/andrjohns/32/15297_2.png) [@andrjohns](https://discourse.mc-stan.org/u/andrjohns)\
**Post date:** [February 11, 2021, 9:05am UTC](https://discourse.mc-stan.org/t/installing-rstan/20743/2 "2021-02-11T09:05:37Z")

</div>

Can you try restarting R and reinstalling RStan and StanHeaders from source:

```
# Compile packages using all cores
Sys.setenv(MAKEFLAGS = paste0("-j",parallel::detectCores()))

install.packages(c("StanHeaders","rstan"),type="source")

```

---

_[View the full topic](https://discourse.mc-stan.org/t/installing-rstan/20743)._
