title: Runing a compiled program on another macOS machine fails
body: <p>When trying to run a simple compiled (with <code>go build -o hello</code>) &quot;Hello world&quot;-ish Go program on another macOS (M1 Air 2020), I get the following error:</p>
  <pre class="lang-sh prettyprint-override"><code>bash-3.2$ ./hello 
  bash: ./hello: Operation not permitted
  </code></pre>
  <p>The program runs fine on my machine though.</p>
  <p>Following is its source code:</p>
  <pre class="lang-golang prettyprint-override"><code>package main
  
  import &quot;fmt&quot;
  
  func main() {
      fmt.Println(&quot;Why can't you run me?&quot;)
  }
  </code></pre>
  <p>Do I need to sign the binary in some way (if so, please tell me how or provide links)? Or something else is the problem?</p>
  <p><code>go env</code>:</p>
  <pre><code>~/r/test 1m 51.8s ❱ go env
  GO111MODULE=&quot;&quot;
  GOARCH=&quot;arm64&quot;
  GOBIN=&quot;&quot;
  GOCACHE=&quot;/Users/fperson/Library/Caches/go-build&quot;
  GOENV=&quot;/Users/fperson/Library/Application Support/go/env&quot;
  GOEXE=&quot;&quot;
  GOFLAGS=&quot;&quot;
  GOHOSTARCH=&quot;arm64&quot;
  GOHOSTOS=&quot;darwin&quot;
  GOINSECURE=&quot;&quot;
  GOMODCACHE=&quot;/Users/fperson/.asdf/installs/golang/1.16.4/packages/pkg/mod&quot;
  GONOPROXY=&quot;&quot;
  GONOSUMDB=&quot;&quot;
  GOOS=&quot;darwin&quot;
  GOPATH=&quot;/Users/fperson/.asdf/installs/golang/1.16.4/packages&quot;
  GOPRIVATE=&quot;&quot;
  GOPROXY=&quot;https://proxy.golang.org,direct&quot;
  GOROOT=&quot;/Users/fperson/.asdf/installs/golang/1.16.4/go&quot;
  GOSUMDB=&quot;sum.golang.org&quot;
  GOTMPDIR=&quot;&quot;
  GOTOOLDIR=&quot;/Users/fperson/.asdf/installs/golang/1.16.4/go/pkg/tool/darwin_arm64&quot;
  GOVCS=&quot;&quot;
  GOVERSION=&quot;go1.16.4&quot;
  GCCGO=&quot;gccgo&quot;
  AR=&quot;ar&quot;
  CC=&quot;clang&quot;
  CXX=&quot;clang++&quot;
  CGO_ENABLED=&quot;1&quot;
  GOMOD=&quot;/Users/fperson/random/test/go.mod&quot;
  CGO_CFLAGS=&quot;-g -O2&quot;
  CGO_CPPFLAGS=&quot;&quot;
  CGO_CXXFLAGS=&quot;-g -O2&quot;
  CGO_FFLAGS=&quot;-g -O2&quot;
  CGO_LDFLAGS=&quot;-g -O2&quot;
  PKG_CONFIG=&quot;pkg-config&quot;
  GOGCCFLAGS=&quot;-fPIC -arch arm64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/mh/02gmkb756x15018g919jcg980000gn/T/go-build3982328171=/tmp/go-build -gno-record-gcc-switches -fno-common&quot;
  </code></pre>