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

cmd/go: add -pkgdir for redirecting installed artifacts #10210

Closed
thockin opened this issue Mar 21, 2015 · 3 comments
Closed

cmd/go: add -pkgdir for redirecting installed artifacts #10210

thockin opened this issue Mar 21, 2015 · 3 comments
Milestone

Comments

@thockin
Copy link

thockin commented Mar 21, 2015

We build static binaries: CGO_ENABLED=0 go install -x -installsuffix cgo <pkg>

For some users, we get an error: go install runtime: mkdir /usr/lib/google-golang/pkg/linux_amd64_cgo/: permission denied

As per email with Ian, this can be fixed by making the user run sudo CGO_ENABLED=0 go install -a -installsuffix cgo std, but this is unsatisfying. If go can't install to the global dir, perhaps it should try to install somewhere private to my environment?

@mikioh mikioh changed the title building static binaries fails with 'go install' if stdlib needs rebuild cmd/go: building static binaries fails with 'go install' if stdlib needs rebuild Mar 22, 2015
@ianlancetaylor ianlancetaylor added this to the Go1.5 milestone Mar 22, 2015
@rsc rsc changed the title cmd/go: building static binaries fails with 'go install' if stdlib needs rebuild cmd/go: add -pkgdir for redirecting installed artifacts Jun 29, 2015
@rsc
Copy link
Contributor

rsc commented Jun 29, 2015

I plan to add a -pkgdir flag that will be usable when building alternate configurations, so that the standard library can be rebuilt and saved even if it cannot be installed in the standard place.

@thockin
Copy link
Author

thockin commented Jun 29, 2015

That sounds workable, thanks.

On Sun, Jun 28, 2015 at 8:37 PM, Russ Cox notifications@github.com wrote:

I plan to add a -pkgdir flag that will be usable when building alternate
configurations, so that the standard library can be rebuilt and saved even
if it cannot be installed in the standard place.


Reply to this email directly or view it on GitHub
#10210 (comment).

@gopherbot
Copy link

CL https://golang.org/cl/12171 mentions this issue.

@rsc rsc closed this as completed in b2cb3b4 Jul 15, 2015
@golang golang locked and limited conversation to collaborators Jul 18, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants