<p>After days of spelunking the internet, I found a comment in IOG <code>ask-nix-os</code> suggesting to use</p>
<pre><code>GC_DONT_GC=1 nix-shell
</code></pre>
<p>and that solved the problem.</p>
<p>As of today, if you follow all the steps in my issue post, plus run your nix shell with the prefix above you should be able to successfully get nix working with an M1/M2 Macbook</p>

CC BY-SA 4.0
2023-02-22T16:46:29.290Z
2023-02-22T16:46:29.290Z
Woodland Pools
<p>I'm unable to run <code>nix-shell</code> on my new M2 Macbook.</p>
<p>I read through the posts from last year on setting up M1 Macbooks with previous <code>plutus-apps</code> tags, but the same steps do not seem to work.</p>
<p>Environment: I'm using a new M2 Macbook and plutus-apps tag v1.1.0</p>
<p>I followed the plutus-community install steps for M1 from <a href="https://github.com/input-output-hk/plutus-community/blob/main/docs/Environment/Build/Mac_M1.md" rel="nofollow noreferrer">https://github.com/input-output-hk/plutus-community/blob/main/docs/Environment/Build/Mac_M1.md</a></p>
<ul>
<li>only change to this was in substituters and trusted keys (see notes below for more detail)</li>
</ul>
<p>I installed Rosetta 2 with</p>
<pre><code>sudo softwareupdate --install-rosetta --agree-to-license
</code></pre>
<p>and installed nix package manager with</p>
<pre><code>sh &lt;(curl -L https://nixos.org/nix/install)
</code></pre>
<p>this is my <code>nix.conf</code></p>
<pre><code>build-users-group = nixbld

experimental-features = nix-command flakes

substituters = https://cache.iog.io https://cache.nixos.org https://digitallyinduced.cachix.org https://all-hies.cachix.org https://cache.zw3rk.com

trusted-public-keys = hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= digitallyinduced.cachix.org-1:y+wQvrnxQ+PdEsCt91rmvv39qRCYzEgGQaldK26hCKE= all-hies.cachix.org-1:JjrzAOEUsD9ZMt8fdFbzo3jNAyEWlPAwdVuHw4RD43k= loony-tools:pr9m4BkM/5/eSTZlkQyRt57Jz7OMBxNSUiMC4FkcNfk=

system = x86_64-darwin
extra-platforms = x86_64-darwin aarch64-darwin

sandbox = false
extra-sandbox-paths = /System/Library/Frameworks /System/Library/PrivateFrameworks /usr/lib /private/tmp /private/var/tmp /usr/bin/env

keep-outputs = true
keep-derivations = true
</code></pre>
<p>&amp; with that conf when I try to spin up <code>plutus-apps</code> I was finally able to get
<code>nix build -f default.nix docs.site</code>
to run, and I got past the standard M1 error I was seeing people have.
(<a href="https://github.com/input-output-hk/plutus-apps/issues/632" rel="nofollow noreferrer">https://github.com/input-output-hk/plutus-apps/issues/632</a>)</p>
<p>Once I got past that error (with the updated nix conf above), and nix build completes successfully, when I run <code>nix-shell</code>  I get this error</p>
<pre><code>segmentation fault  nix-shell
</code></pre>
<p>not very insightful error at all, and I am out of ideas on what might be causing it</p>
<p>any ideas on what might be going on or what else I can try?</p>
<p>Some other notes:</p>
<ul>
<li>The old posts/solutions include hydra as a substituter, but this repo was deprecated last year by IOG in a node upgrade, so I've removed it</li>
<li>I have a couple of other substituters and trusted keys in there from a separate repo I was trying out, but I doubt those are related to this issue.</li>
</ul>

<plutus><nix><nix-shell><plutus-apps>
plutus-apps nix-shell on Mac M2 segmentation fault
# plutus-apps nix-shell on Mac M2 segmentation fault

(Asked by: username_0 on 2023-02-22)

I'm unable to run nix-shell on my new M2 Macbook.
I read through the posts from last year on setting up M1 Macbooks with previous plutus-apps tags, but the same steps do not seem to work.
Environment: I'm using a new M2 Macbook and plutus-apps tag v1.1.0
I followed the plutus-community install steps for M1 from https://github.com/input-output-hk/plutus-community/blob/main/docs/Environment/Build/Mac_M1.md

only change to this was in substituters and trusted keys (see notes below for more detail)

I installed Rosetta 2 with
sudo softwareupdate --install-rosetta --agree-to-license

and installed nix package manager with
sh <(curl -L https://nixos.org/nix/install)

this is my nix.conf
build-users-group = nixbld

experimental-features = nix-command flakes

substituters = https://cache.iog.io https://cache.nixos.org https://digitallyinduced.cachix.org https://all-hies.cachix.org https://cache.zw3rk.com

trusted-public-keys = hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= digitallyinduced.cachix.org-1:y+wQvrnxQ+PdEsCt91rmvv39qRCYzEgGQaldK26hCKE= all-hies.cachix.org-1:JjrzAOEUsD9ZMt8fdFbzo3jNAyEWlPAwdVuHw4RD43k= loony-tools:pr9m4BkM/5/eSTZlkQyRt57Jz7OMBxNSUiMC4FkcNfk=

system = x86_64-darwin
extra-platforms = x86_64-darwin aarch64-darwin

sandbox = false
extra-sandbox-paths = /System/Library/Frameworks /System/Library/PrivateFrameworks /usr/lib /private/tmp /private/var/tmp /usr/bin/env

keep-outputs = true
keep-derivations = true

& with that conf when I try to spin up plutus-apps I was finally able to get
nix build -f default.nix docs.site
to run, and I got past the standard M1 error I was seeing people have.
(https://github.com/input-output-hk/plutus-apps/issues/632)
Once I got past that error (with the updated nix conf above), and nix build completes successfully, when I run nix-shell  I get this error
segmentation fault  nix-shell

not very insightful error at all, and I am out of ideas on what might be causing it
any ideas on what might be going on or what else I can try?
Some other notes:

The old posts/solutions include hydra as a substituter, but this repo was deprecated last year by IOG in a node upgrade, so I've removed it
I have a couple of other substituters and trusted keys in there from a separate repo I was trying out, but I doubt those are related to this issue.

**Tags:** plutus, nix, nix-shell, plutus-apps

---

## 1 answers

### Answer by username_0 on 2023-02-22. Score: 2

After days of spelunking the internet, I found a comment in IOG ask-nix-os suggesting to use
GC_DONT_GC=1 nix-shell

and that solved the problem.
As of today, if you follow all the steps in my issue post, plus run your nix shell with the prefix above you should be able to successfully get nix working with an M1/M2 Macbook


---

