Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
FS#41561 - [go] go install bytes: permission denied after upgrading to 1.3.1
Attached to Project:
Community Packages
Opened by Stanislav Seletskiy (seletskiy) - Thursday, 14 August 2014, 06:34 GMT
Last edited by Alexander F. Rødseth (xyproto) - Thursday, 09 February 2017, 11:22 GMT
Opened by Stanislav Seletskiy (seletskiy) - Thursday, 14 August 2014, 06:34 GMT
Last edited by Alexander F. Rødseth (xyproto) - Thursday, 09 February 2017, 11:22 GMT
|
DetailsDescription:
`go install [...]: open /usr/lib/go/pkg/linux_amd64/[...].a: permission denied` errors after upgrading go from 1.3 to 1.3.1. Steps to reproduce: 1. Upgrade go to 1.3.1; 2. go get any package and see the error, for example: $ go get git.bytbox.net/sloc.git/sloc go install bytes: open /usr/lib/go/pkg/linux_amd64/bytes.a: permission denied go install strings: open /usr/lib/go/pkg/linux_amd64/strings.a: permission denied |
This task depends upon
Closed by Alexander F. Rødseth (xyproto)
Thursday, 09 February 2017, 11:22 GMT
Reason for closing: Fixed
Thursday, 09 February 2017, 11:22 GMT
Reason for closing: Fixed
$ go list -f '{{.Stale}}' bytes
true
$ go list -f '{{.Stale}}' strings
true
When you want to install a package that imports these packages (bytes and strings), go compiles and try to install them in /usr/lib/go/pkg/linux_amd64. As non-root user, you don't have the permission to write in this directory.
I had the same issue. The following resolved it for me:
find /usr/lib/go -name "*.a" -exec touch -r `which go` {} \;
Hope this helps.
I recompiled the package myself and that helped and also tried Makpoc find command and that helped too
What do you think the issue is Makpoc? I'm curious to how you came to conclusion about file time stamp
Note that steps to reproduce might be misleading -- this will only happen if you go get something that actually depends on bytes/strings.
(I've reinstalled go from the repositories to check that it's still true on my machine.)
I've sniffed a bit around and some stdlib packages in community/go are stale and some aren't. See the attached file for how this looks on my system. Use the script below to generate the results on your machine (if your so inclined).
for pkg in `find /usr/lib/go | grep '\.a$' | sed '{s/\/usr\/lib\/go\/pkg\/linux_amd64\///; s/\.a$//}'`; do
echo $pkg `go list -f {{.Stale}} $pkg`
done 2> /dev/null | sort > out
EDIT: Change the linux_amd64 part in the sed script to the directory for your machine's architecture.
EDIT2: Oh, did you mean that some other stdlib packages will also cause the issue (as opposed to all)?
quote:
I suggest that we update the docs to tell people to tell tar to preserve time stamps from the archive.
sudo go install <nameofpackage>
or install all
sudo go install all
and try to install you package in gopath
go get github.com/revel/cmd/revel (exemple)
It conveys what you're tryin to do better and in the odd circumstance that the user under whom the install script runs has a GOPATH set -- it prevents you from automatically reinstalling everything they have go installed by hand.
su -c 'go install std'
Please confirm that go-2:1.3.1-2 now works as expected, it should appear in [community] any minute now.
Tested the steps to reproduce, and it works here.
go get github.com/nsf/gocode Thu Aug 28, 17:34
go install bytes: open /usr/lib/go/pkg/linux_amd64/bytes.a: permission denied
go install strings: open /usr/lib/go/pkg/linux_amd64/strings.a: permission denied
I guess you can close this one.