Envoy --version giving segmentation fault when following consul guide

I’m following the guide below:

My device specs are:
Macbook Air
OS Version: MacOS Monterry 12.2.1
M1 Chip 2020

When I run envoy --version, I get “zsh: segmentation fault envoy --version”.
I have added the env variable as mentioned in the tutorial.

Segmentation issues are memory related, so it’s something locally in the environment that is causing conflicting memory usage. If you remove Envoy, restart the computer, and attempt to re-install. Does that resolve the error by chance?

@karl-cardenas-coding
There’s a known issue with envoy proxy not working with Monterey version.

To resolve this,

  1. I upgraded to Monterey 12.3.1
  2. Downloaded Xcode since having only xcode command line tools is not enough. Also, I had to fix active directory for xcode as mentioned here(macos - xcode-select active developer directory error - Stack Overflow)
  3. Built envoy from source: brew install -v --build-from-source envoy. This installed v1.21.1 release of envoy. This step takes a while. After this, I removed the old installation of envoy which was suggested in the guide from usr/local/bin directory.

After the above steps, I was able to get envoy proxy working. I’m not exactly sure where the issue occurred but I would suggest to add a note about this to the consul tutorial as well when setting up the sidecar proxy if you feel it’s the right place.