-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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
cmd/go: go build -i results in "/usr/local/go/pkg/darwin_amd64/runtime/cgo.a: permission denied" #37962
Comments
This probably means that your The |
I had the same error when I installed golang using the .pkg file. Oddly(?), it only offered to install system-wide (i.e. for all users) and all the files installed to /usr/local/go were owned by root. Removing golang (
I no longer have that fakakta error. If it matters, I'm on macOS Mojave 10.14.6. |
To clarify, the Since Go 1.10, which introduced the build cache, the @xiaoxfan @ppinter1 Could you say more about what you're using |
In my case, I sometimes use the CLI, but mostly build projects using VScode with go extensions. The VScode setting However, using sudo to expand the go1.14.1.darwin-amd64.tar.gz file to /usr/local works. |
@ppinter1 Thanks for clarifying. I remember changing the default was discussed in microsoft/vscode-go#2836. Maybe comment on that issue or open a new one? It's expected that |
Ah, okay. Thanks for clearing that up. It's a good day when I learn summit and today's a good day. |
Timed out in state WaitingForInfo. Closing. (I am just a bot, though. Please speak up if this is a mistake or you have the requested information.) |
Atom and go-plus have exactly the same problem. |
In the event anyone else is still seeing this problem with Go 1.14. I use Homebrew as my package manager but when I was installing go, I downloaded and installed it from the golang website. and install it via Homebrew: That resolved my issue. |
Another workaround:
|
I installed Go 1.15 through the official installer and this still happens. Couldn't the installer provide a fix for this? Thanks |
@andreagrandi Don't use |
I didn't use the Should I open a bug in the VSCode Go extension then? p.s: the workaround |
Sounds like it. It certainly shouldn't run |
@andreagrandi Please do file an issue at https://github.com/golang/vscode-go/issues. Make sure to include a link to this issue and to microsoft/vscode-go#2836. Note that microsoft/vscode-go#2836 is very closely related, but the decision there was to continue using |
done golang/vscode-go#568 |
See golang/go#37962 (comment) for futher justifications.
See golang/go#37962 (comment) for futher justifications. Signed-off-by: Marques Johansson <marques@packet.com>
See golang/go#37962 (comment) for futher justifications. Signed-off-by: Marques Johansson <marques@packet.com>
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
build my project use -i
go build -i -v -o ./bin/demo-api .
What did you expect to see?
no error
What did you see instead?
go build -i -v -o ./bin/demo-api .
go build runtime/cgo: copying /Users/hrbc/Library/Caches/go-build/63/63a132c80210b5c7b4f4ed9a902aaec712c42b15e23aa2c1b1778e2f85165d04-d: open /usr/local/go/pkg/darwin_amd64/runtime/cgo.a: permission denied
The text was updated successfully, but these errors were encountered: