Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error building kafkactl #14

Open
sgermain06 opened this issue Apr 14, 2023 · 5 comments
Open

Error building kafkactl #14

sgermain06 opened this issue Apr 14, 2023 · 5 comments

Comments

@sgermain06
Copy link

I followed the instructions provided on the README file of this repository. I installed golang 1.19, from Kali's APT repository. Not quite sure what the next steps are here.

PWD: /home/user/projects/tmp/kafkactl
GOPATH: /home/user/go

❯ go build -o $GOPATH/bin/kafkactl
cli/kafka/adminConfig.go:24:2: github.com/jbvmio/[email protected]: replacement directory ../kafka does not exist
cli/cmd/root.go:28:2: github.com/jbvmio/[email protected] (replaced by ../kafka): reading ../kafka/go.mod: open /home/user/projects/tmp/kafka/go.mod: no such file or directory

@drobati
Copy link

drobati commented May 10, 2023

I tried to install with golang 1.16 which is the oldest supported version my homebrew would install and got this error

cli/cmd/group/descGroup.go:7:2: import "github.com/jbvmio/kafka" is a program, not an importable package
package github.com/jbvmio/kafkactl
	imports github.com/jbvmio/kafkactl/cli/cmd
	imports github.com/jbvmio/kafkactl/cli/cmd/admin
	imports github.com/jbvmio/kafkactl/cli/cmd/admin/adminGet
	imports github.com/jbvmio/kafkactl/cli/kafka
	imports github.com/jbvmio/kafka
	imports github.com/jbvmio/kafkactl/cli/cmd: import cycle not allowed
cli/cmd/root.go:28:2: no required module provides package github.com/jbvmio/kafkactl/cli/cmd/test; to add it:
	go get github.com/jbvmio/kafkactl/cli/cmd/test
../../../go/pkg/mod/github.com/klauspost/[email protected]/zstd/blockdec.go:17:2: //go:build comment without // +build comment
../../../go/pkg/mod/github.com/!shopify/[email protected]/zstd.go:6:2: //go:build comment without // +build comment

I did fix the above issue by renaming the directory that git clone creates as kafkactl to kafka which seems to be hardcoded in the go.mod.

@jbvmio
Copy link
Owner

jbvmio commented Jun 30, 2023

Apologies, error on my part - Issue should be fixed using master. If either of you still experience build errors let me know, thanks for the heads up

@sgermain06
Copy link
Author

sgermain06 commented Jun 30, 2023 via email

@drobati
Copy link

drobati commented Jan 31, 2024

When I revisited this today, trying the manual install looked like this

go build -o $GOPATH/bin/kafkactl
go: github.com/Shopify/[email protected] requires
	github.com/Shopify/toxiproxy/[email protected]: missing go.sum entry; to add it:
	go mod download github.com/Shopify/toxiproxy/v2

so I ran go mod download github.com/Shopify/toxiproxy/v2 as it suggested,

Then I tried

go build -o $GOPATH/bin/kafkactl
../../../go/pkg/mod/github.com/klauspost/[email protected]/zstd/blockdec.go:17:2: //go:build comment without // +build comment
../../../go/pkg/mod/github.com/!shopify/[email protected]/zstd.go:6:2: //go:build comment without // +build comment

Not exactly sure what this error means.

@drobati
Copy link

drobati commented Feb 1, 2024

Updated go through brew to 1.21 from 1.16. Worked great thanks!

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

No branches or pull requests

3 participants