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

Go build error when trying to generate "generator" file #1117

Closed
R4ZZB3RRY opened this issue Feb 18, 2024 · 6 comments
Closed

Go build error when trying to generate "generator" file #1117

R4ZZB3RRY opened this issue Feb 18, 2024 · 6 comments

Comments

@R4ZZB3RRY
Copy link

Hi. I'm tryin to build the generator file and I am getting a permission denied error. The error happens when trying to open the generator file.

mitchell@mitchell-virtual-machine:~/go/src/snmp_exporter/generator$ go build
github.com/prometheus/snmp_exporter/generator: go build github.com/prometheus/snmp_exporter/generator: copying /tmp/go-build1039860546/b001/exe/a.out: open generator: permission denied

I've been using go build version 1.22.0 and have installed all dependencies.

Host operating system: output of uname -a

Linux mitchell-virtual-machine 5.15.0-94-generic #104~20.04.1-Ubuntu SMP Tue Jan 16 13:34:09 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux

What did you do that produced an error?

ran go build

What did you expect to see?

generator file

What did you see instead?

permission denied

@SuperQ
Copy link
Member

SuperQ commented Feb 18, 2024

What do you get for:

ls -ld . generator

@R4ZZB3RRY
Copy link
Author

no such file or directory

@R4ZZB3RRY
Copy link
Author

mitchell@mitchell-virtual-machine:~/go/src/snmp_exporter/generator$ ls -ld . generator
ls: cannot access 'generator': No such file or directory
drwxr-xr-x 3 root root 4096 Feb 17 14:43 .

@SuperQ
Copy link
Member

SuperQ commented Feb 18, 2024

Your checkout is owned by root, your user can not write to that.

@SuperQ SuperQ closed this as completed Feb 18, 2024
@R4ZZB3RRY
Copy link
Author

how do i chown the checkout?

@R4ZZB3RRY
Copy link
Author

nevermind i figured it out. Thanks for your help

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

2 participants