[pkg-golang-devel] Bug#818651: Bug#818651: Bug#818651: golang: cannot use net package without CGO
michael.hudson at canonical.com
Tue Apr 26 10:32:24 UTC 2016
On 20 March 2016 at 21:08, Michael Hudson-Doyle
<michael.hudson at canonical.com> wrote:
>> The exact (but cryptic) error reported is:
>> go install net: open /usr/lib/go/pkg/linux_amd64/net.a: permission denied
>> Since Go 1.2 (according to the docs ) it should be possible to use the net
>> package without CGO on some systems.
>> My system is linux-amd64 (one with jessie and one with testing).
> You can build the executable, but you have to use 'go build' and not
> 'go install'.
> This is all reminiscent of the conversation after
> https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=776401#27 although
> it's a bit worse than that because the set up here really wants to
> replace GOROOT/pkg/linux_amd64/net.a, not install another one.
I finally mentioned this on the upstream list and Russ Cox pointed out
that you can use the -pkgdir argument to the go tool here, you can do
something like go install -pkgdir ~/.gopkgdir instead of plain go
More information about the pkg-golang-devel