Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
GitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Permission denied while running go install #40417
go install cmd/go: copying /var/folders/wh/9y99138n2w1bvcwxz3tbb8zw0000g n/T/go-build195667123/b150/exe/a.out: open /usr/local/go/bin/go: permission denied
It looks like my env variables are set correctly:
Here's my directory of my current project: which is inside my go path:
Since it looks like the permission error is not in my project but in my go install path, I am not sure if I should change ownership of such files.
total 37032 drwxr-xr-x 4 root wheel 128B Jul 16 15:53 . drwxr-xr-x 20 root wheel 640B Jul 16 15:29 .. -rwxr-xr-x 1 root wheel 15M Jul 16 15:52 go -rwxr-xr-x 1 root wheel 3.4M Jul 16 15:53 gofmt
Go version: go1.14.6 darwin/amd64
You didn't write the exact command you're running, but if you're running
What you want is
In general, unless the project is really big and the build steps complicated, you just directly run the
Please note that the Go project does not use its bug tracker for general discussion or asking questions about the language. See the Questions wiki page if you have further questions.
I'm now closing this issue, since we don't have a Go bug.