Xk6 go installation not working on macOS with go 1.24, command not found: xk6

I am trying to install xk6 on local machine (arm 64), but binary xk6 not getting added to bin folder. Getting error command not found.

➜ ~ go version
go version go1.24.1 darwin/arm64
➜ ~ go install -v -n -a go.k6.io/xk6/cmd/xk6@latest
mkdir -p $WORK/b001/exe/
cd .
GOROOT=‘/usr/local/go’ /usr/local/go/pkg/tool/darwin_arm64/link -o $WORK/b001/exe/a.out -importcfg $WORK/b001/importcfg.link -X=runtime.godebugDefault=asynctimerchan=1,gotestjsonbuildtext=1,gotypesalias=0,httpservecontentkeepheaders=1,multipathtcp=0,randseednop=0,rsa1024min=0,tls3des=1,tlsmlkem=0,x509keypairleaf=0,x509negativeserial=1,x509rsacrt=0,x509usepolicies=0 -buildmode=pie -buildid=PG1n4DL_10Tad_uD37T0/FClu04f52YsyvihqPCYB/FClu04f52YsyvihqPCYB/PG1n4DL_10Tad_uD37T0 -extld=clang $WORK/b001/pkg.a
/usr/local/go/pkg/tool/darwin_arm64/buildid -w $WORK/b001/exe/a.out # internal
mkdir -p /Users/vinodkr/go/bin/
mv $WORK/b001/exe/a.out /Users/vinodkr/go/bin/xk6
rm -rf $WORK/b001/
➜ ~ ls -ltr go/bin
total 0
➜ ~ go install -v -n -a go.k6.io/xk6/cmd/xk6@latest

➜ ~ go env | grep -e ‘GOPATH|GOBIN|GOROOT’
➜ ~ go env | egrep ‘(GOPATH|GOBIN|GOROOT)’
GOBIN=‘/Users/vinodkr/go/bin’
GOPATH=‘/Users/vinodkr/go’
GOROOT=‘/usr/local/go’
➜ ~ uname -m
arm64

➜ ~ xk6 version
zsh: command not found: xk6
➜ ~ ls -ltr /usr/local/go/bin
total 32536
-rwxr-xr-x@ 1 root wheel 2894816 Feb 27 09:57 gofmt
-rwxr-xr-x@ 1 root wheel 13761440 Feb 27 09:57 go
➜ ~

Hey @vinodkr,

Welcome to our community forums! :tada:

I tried to reproduce your issue locally, same OS and ARCH, with no luck.
Unfortunately (or not), it worked for me.

So, I pinged the folks on the team that owns this tool to have a look at this thread.
Hopefully they’ll eventually get you with some assistance :crossed_fingers:

Btw, I don’t think xk6 version is a valid command.
Anyway, it should find xk6 and through and error from there. Don’t what’s going on with the installation.

Hi again @vinodkr,

Can you confirm that running /Users/vinodkr/go/bin/xk6 also fails? Just to confirm it isn’t a problem with the environment (e.g. none of $GOBIN or $GOPATH/bin in the $PATH).

Thanks!

Hi @joanlopez
It seems binary not getting copied or not getting created. I am running below command
go install -v -n -a go.k6.io/xk6/cmd/xk6@latest

Terminal output:
mkdir -p /usr/local/go/bin/
mv $WORK/b001/exe/a.out /usr/local/go/bin/xk6
rm -rf $WORK/b001/
➜ ~ ls -ltr /Users/vinodkr/go/bin
ls: /Users/vinodkr/go/bin: No such file or directory
➜ ~ ls -ltr /usr/local/go/bin/xk6
ls: /usr/local/go/bin/xk6: No such file or directory
➜ ~ go env | egrep ‘GOPATH|GOBIN|GOROOT’
GOBIN=‘/usr/local/go/bin’
GOPATH=‘/Users/vinodkr/go’
GOROOT=‘/usr/local/go’
➜ ~ echo $PATH
/Users/vinodkr/.nvm/versions/node/v22.14.0/bin:/Users/vinodkr/go/bin:/usr/local/go/bin:

Hey @vinodkr,

I’m curious that, in your previous comment, the output was pointing to /Users/vinodkr/go/bin/xk6, while know it points to /usr/local/go/bin/xk6, which makes me suspect that something might be wrong in your Go installation/environment.

So far, we haven’t been able to reproduce it locally, I’m sorry.

Hi @joanlopez
I tried both settings for GOBIN, pointing it to bin folder in go installation directory and bin folder in GOPATH directory, both cases it did not copy the x6 binary, also there is error printed in verbose output.