# MacOS

**URL:** <https://discourse.mc-stan.org/t/macos/29229>\
**Category:** RStan\
**Created:** [October 25, 2022, 9:42am UTC](https://discourse.mc-stan.org/t/macos/29229 "2022-10-25T09:42:06Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jacquie](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/jacquie/32/19488_2.png) [@Jacquie](https://discourse.mc-stan.org/u/Jacquie)\
**Post date:** [October 25, 2022, 9:42am UTC](https://discourse.mc-stan.org/t/macos/29229/1 "2022-10-25T09:42:06Z")

</div>

I need to upgrade my OS from Catalina as Apple will stop security updates probably this year. I remember at the time getting RStan to run on Catalina took a while to figure out. What is the latest OS that RStan runs on easily, are any of them fine?

---

<div class="post-metadata">

**Author:** ![torkar](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/torkar/32/1355_2.png) [@torkar](https://discourse.mc-stan.org/u/torkar)\
**Post date:** [October 25, 2022, 11:20am UTC](https://discourse.mc-stan.org/t/macos/29229/2 "2022-10-25T11:20:52Z")

</div>

I use Monterey 12.6 and it works fine :)

---

<div class="post-metadata">

**Author:** ![Ara\_Winter](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/ara_winter/32/4284_2.png) [@Ara\_Winter](https://discourse.mc-stan.org/u/Ara_Winter)\
**Post date:** [October 27, 2022, 2:50pm UTC](https://discourse.mc-stan.org/t/macos/29229/3 "2022-10-27T14:50:20Z")

</div>

I am running rstan on Ventura (13.0) on the M1 chips. It was a little weird to figure out how to get it running.

Downloaded Xcode from the App store.

Open up Xcode and select the Install option (this was not clear). Like really, I have to install twice _eyeroll_

Go to the Apple Developer website and download the Command Line Tools .dmg . For some reason the auto find and update is broken at the moment. If you type make or git in the Terminal it will helpfully tell you it’s installing these tools but utterly fail to install them.

Check to make sure Xcode is seeing your Command Line Tools. It’s in Xcode either under Preferences → Locations or on my version Settings → Locations.

Install the new version of R and RStudio. You may need to install rlang and processx manually.

Test run with the 8schools model and hope nothing else is broken.

I am going to mess around with getting CmdStan up and running today.

---

<div class="post-metadata">

**Author:** ![torkar](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/torkar/32/1355_2.png) [@torkar](https://discourse.mc-stan.org/u/torkar)\
**Post date:** [October 27, 2022, 5:00pm UTC](https://discourse.mc-stan.org/t/macos/29229/4 "2022-10-27T17:00:55Z")

</div>

Didn’t `xcode-select --install` work in the terminal?

Good to see that it works Okish :)

---

<div class="post-metadata">

**Author:** ![Ara\_Winter](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/ara_winter/32/4284_2.png) [@Ara\_Winter](https://discourse.mc-stan.org/u/Ara_Winter)\
**Post date:** [October 27, 2022, 5:41pm UTC](https://discourse.mc-stan.org/t/macos/29229/5 "2022-10-27T17:41:06Z")

</div>

The xcode select command in the terminal fails on my end. It helpful replies that everything is already installed and to use the software updater. Which does nothing _laugh-cry_ .

---

<div class="post-metadata">

**Author:** ![jgoldberg](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/jgoldberg/32/18790_2.png) [@jgoldberg](https://discourse.mc-stan.org/u/jgoldberg)\
**Post date:** [November 1, 2022, 6:52pm UTC](https://discourse.mc-stan.org/t/macos/29229/6 "2022-11-01T18:52:59Z")

</div>

Hey @Ara_Winter ,

Have you had an luck with CmdStan in Ventura?

I also updated macOS and `cmdstanr::install_cmdstan()` produces an error at `xattr -d com.apple.quarantine bin/stanc`. Seems like that “file” does not exist in that location.

I’ll keep troubleshooting, but wondered if there were others who had already waded through this problem successfully. I’ll report back with any progress if that’s needed.

---

<div class="post-metadata">

**Author:** ![Ara\_Winter](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/ara_winter/32/4284_2.png) [@Ara\_Winter](https://discourse.mc-stan.org/u/Ara_Winter)\
**Post date:** [November 1, 2022, 8:41pm UTC](https://discourse.mc-stan.org/t/macos/29229/7 "2022-11-01T20:41:44Z")

</div>

I grabbed the arm build (edit: Apple Silicon, M1 ) from here [Releases · stan-dev/cmdstan · GitHub](https://github.com/stan-dev/cmdstan/releases) and it runs.  
I did the following

1. Make - which returned no errors
2. make examples/bernoulli/bernoulli which throws a bunch of errors around sprintf. Some dire security warnings.
3. examples/bernoulli/bernoulli sample data file=examples/bernoulli/bernoulli.data.R , runs the example model. Looks like it sampled correctly.

I have the cmd folder in my Documents folder, not sure if it matters where it lives. Let me try building my own model and see what happens.

---

<div class="post-metadata">

**Author:** ![torkar](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/torkar/32/1355_2.png) [@torkar](https://discourse.mc-stan.org/u/torkar)\
**Post date:** [November 2, 2022, 6:18am UTC](https://discourse.mc-stan.org/t/macos/29229/8 "2022-11-02T06:18:43Z")

</div>

I upgraded to Ventura. `xcode-select --install` simply verified I had everything installed. All seems to work without a problem (incl. `cmdstanr` and `cmdstan`).

---

<div class="post-metadata">

**Author:** ![jgoldberg](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/jgoldberg/32/18790_2.png) [@jgoldberg](https://discourse.mc-stan.org/u/jgoldberg)\
**Post date:** [November 2, 2022, 5:40pm UTC](https://discourse.mc-stan.org/t/macos/29229/9 "2022-11-02T17:40:36Z")

</div>

@torkar , are you using Apple or Intel silicon?

I have an Intel-based macOS machine and have yet to resolve a path forward with `cmdstan`/`cmdstanr`. I’ve managed to replicate this issue on two different computers (both Intel macOS). From what I’ve been able to gather, the `xattr -d com.apple.quarantine bin/stanc` is attempting to change the attributes/metadata of the Stan compiler, so something is different about the way things get unpacked from GitHub by `cmdstanr::install_cmdstan()` that is unique to Intel-based macOS.

---

<div class="post-metadata">

**Author:** ![torkar](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/torkar/32/1355_2.png) [@torkar](https://discourse.mc-stan.org/u/torkar)\
**Post date:** [November 2, 2022, 5:59pm UTC](https://discourse.mc-stan.org/t/macos/29229/10 "2022-11-02T17:59:21Z")

</div>

I use Apple silicon :)

---

<div class="post-metadata">

**Author:** ![jgoldberg](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/jgoldberg/32/18790_2.png) [@jgoldberg](https://discourse.mc-stan.org/u/jgoldberg)\
**Post date:** [November 2, 2022, 6:51pm UTC](https://discourse.mc-stan.org/t/macos/29229/11 "2022-11-02T18:51:44Z")

</div>

Alright, I’ve created a separate topic to address [my issue](https://discourse.mc-stan.org/t/issues-with-cmdstan-install-on-macos-ventura-w-intel-chip/29327). Thanks all!
