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

Build tries to alter system files #24

Open
TheMeier opened this issue Jul 4, 2018 · 1 comment
Open

Build tries to alter system files #24

TheMeier opened this issue Jul 4, 2018 · 1 comment

Comments

@TheMeier
Copy link

TheMeier commented Jul 4, 2018

When I run make i get the following error:

go build net: open /usr/lib/golang/pkg/linux_amd64/net.a: permission denied
!! command failed: build -o /home/myuser/go/src/github.com/BonnierNews/logstash_exporter/logstash_exporter -ldflags -s -X github.com/BonnierNews/logstash_exporter/vendor/github.com/prometheus/common/version.Version=0.1.2 -X github.com/BonnierNews/logstash_exporter/vendor/github.com/prometheus/common/version.Revision=d0391964df9c3ba49a605c0c7d98399b0e54e586 -X github.com/BonnierNews/logstash_exporter/vendor/github.com/prometheus/common/version.Branch=master -X github.com/BonnierNews/logstash_exporter/vendor/github.com/prometheus/common/version.BuildUser=myuser@myhost -X github.com/BonnierNews/logstash_exporter/vendor/github.com/prometheus/common/version.BuildDate=20180704-06:42:50  -extldflags '-static' -i -tags 'netgo static_build' github.com/BonnierNews/logstash_exporter: exit status 1

The build should not try to write to anywhere outside the build-environment

@lrstanley
Copy link

This isn't (wasn't) a problem with logstash_exporter, rather with Go and/or your environment. Changes to Go (I believe) should have helped some of these issues (see: golang/go#18981), but the short of it is, it was likely because where you installed Go from, it didn't have all of the standard library pre-compiled (this is a common problem when you install from brew, debian/ubuntu package managers, etc).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants