Skip to content
This repository has been archived by the owner on Dec 8, 2023. It is now read-only.

Facing issue while building xk6 binary #39

Open
mayurk-amdocs opened this issue Dec 1, 2023 · 1 comment
Open

Facing issue while building xk6 binary #39

mayurk-amdocs opened this issue Dec 1, 2023 · 1 comment

Comments

@mayurk-amdocs
Copy link

mayurk-amdocs commented Dec 1, 2023

Hi @javaducky

I followed the steps given in the README #Build and ensured that my $PATH has the location /usr/local/go/bin but seems the system is unable to find xk6. Getting error

$ xk6 command not found

As asked I have also followed process in the README #Development but seems I am having the same issue. Require help in setting up xk6.

MicrosoftTeams-image

@javaducky
Copy link
Contributor

javaducky commented Dec 1, 2023

Hi @mayurk-amdocs !

You installed xk6 using go install go.k6.io/xk6/cmd/xk6@latest, correct? If your Go toolchain is correctly in your path, xk6 should be found as well. You may be able to search the correct path using which xk6.

Another solution would be to build your binary within Docker. For example, on a Mac, I'm able to build the custom binary using:

docker run --rm -e GOOS=darwin -u "$(id -u):$(id -g)" -v "${PWD}:/xk6" \
  grafana/xk6 build v0.47.0 \
  --with github.com/grafana/xk6-amqp

If you're on Linux, simply omit the -e GOOS=darwin. The process is described in more detail at https://grafana.com/docs/k6/latest/extensions/build-k6-binary-using-docker/ .

Hope this helps!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants