M1 Elixir segfault

So when I install elixir with homebrew I get a segfault if i do any command other than the bare ‘elixir’ in the command prompt. I read the forums but the command people mention to disable rosetta doesn’t work, and the other fixes don’t seem to work. Also all discussion seems to be from a couple months ago.

Anyone got any ideas on how to fix this one?

EDIT: Trying to install Elixir 1.12.1-otp-24 on asdf yields a segfault on install as well. Elixir 1.12.1-otp-23 installs fine on asdf.

What versions do you have of things?

Homebrew 3.1.12, Erlang 24.0.2, Elixir 1.12.1

As I recall this happened with people who had an old brew installation. You could try updating or reinstalling home brew and then go from there.

Alternatively you could install with asdf which makes this a whole lot easier than homebrew in my opinion.

1 Like

Ran into this problem this week. In my case, it had to do with my terminal running in Rosetta/X86 compatibility mode.

Once I got that sorted out (along with separating out ARM and X86 Homebrew envs), everything worked fine.

1 Like

I think that’s probably what’s getting me, but when I tried the command I saw on the other thread it didn’t work, how did you put your terminal out of compatibility mode?

I’d been trying out Hyper term, which is electron-based and was automatically running under Rosetta.

Just downloading iTerm2, which has a native M1 version, solved that problem.

Running uname -m Inside your terminal should tell you which arch it’s running.


iTerm2 fixed the problem, reinstall brew with iTerm then reinstall elixir, all will work.

1 Like