Skip to content
This repository has been archived by the owner on Jan 19, 2024. It is now read-only.

Install error #6

Closed
vitalysim opened this issue Feb 10, 2019 · 4 comments
Closed

Install error #6

vitalysim opened this issue Feb 10, 2019 · 4 comments
Assignees

Comments

@vitalysim
Copy link

Hello,

When I run "go install" I'm receiving the following error.

can't load package: package github.com/Ullaakut/Gorsair: unknown import path "github.com/Ullaakut/Gorsair": cannot find module providing package github.com/Ullaakut/Gorsair

@Ullaakut
Copy link
Owner

Ullaakut commented Feb 10, 2019

Hello @vitalysim !

  • Did you run go install cmd from the root of the repository?
  • Did you turn on go modules? (using the GO111MODULE environment variable)
  • Do you have a recent enough version? Go modules (>= 1.11) are required to build Gorsair.

If you don't know the answers to those questions, please just paste the output of go version as an answer and I'll help you install it :)

(A Docker image will be coming soon for those who don't want to build it or don't have go installed.)

@Ullaakut Ullaakut self-assigned this Feb 10, 2019
@vitalysim
Copy link
Author

I did all the three things you mentioned.

I'm running on MAC OS
╰─➤ go version
go version go1.11.5 darwin/amd64

╰─➤ sudo go install cmd
/usr/local/go/src/cmd/internal/objfile/disasm.go:24:2: non-standard import "golang.org/x/arch/arm/armasm" in standard package "cmd/internal/objfile"
can't load package: /usr/local/go/src/cmd/internal/objfile/disasm.go:24:2: non-standard import "golang.org/x/arch/arm/armasm" in standard package "cmd/internal/objfile"
can't load package: /usr/local/go/src/cmd/pprof/pprof.go:28:2: non-standard import "github.com/google/pprof/driver" in standard package "cmd/pprof"
can't load package: /usr/local/go/src/cmd/trace/pprof.go:24:2: non-standard import "github.com/google/pprof/profile" in standard package "cmd/trace"
can't load package: /usr/local/go/src/cmd/vendor/github.com/google/pprof/driver/driver.go:25:2: non-standard import "github.com/google/pprof/profile" in standard package "cmd/vendor/github.com/google/pprof/driver"
/usr/local/go/src/cmd/vendor/github.com/google/pprof/driver/driver.go:23:2: use of internal package github.com/google/pprof/internal/driver not allowed
/usr/local/go/src/cmd/vendor/github.com/google/pprof/driver/driver.go:24:2: use of internal package github.com/google/pprof/internal/plugin not allowed
can't load package: /usr/local/go/src/cmd/vendor/github.com/google/pprof/internal/binutils/disasm.go:24:2: non-standard import "github.com/ianlancetaylor/demangle" in standard package "cmd/vendor/github.com/google/pprof/internal/binutils"
/usr/local/go/src/cmd/vendor/github.com/google/pprof/internal/binutils/binutils.go:29:2: use of internal package github.com/google/pprof/internal/elfexec not allowed
/usr/local/go/src/cmd/vendor/github.com/google/pprof/internal/binutils/addr2liner.go:26:2: use of internal package github.com/google/pprof/internal/plugin not allowed
can't load package: /usr/local/go/src/cmd/vendor/github.com/google/pprof/internal/driver/driver.go:30:2: non-standard import "github.com/google/pprof/profile" in standard package "cmd/vendor/github.com/google/pprof/internal/driver"
/usr/local/go/src/cmd/vendor/github.com/google/pprof/internal/driver/cli.go:23:2: use of internal package github.com/google/pprof/internal/binutils not allowed
/usr/local/go/src/cmd/vendor/github.com/google/pprof/internal/driver/flamegraph.go:23:2: use of internal package github.com/google/pprof/internal/graph not allowed
/usr/local/go/src/cmd/vendor/github.com/google/pprof/internal/driver/driver_focus.go:23:2: use of internal package github.com/google/pprof/internal/measurement not allowed
/usr/local/go/src/cmd/vendor/github.com/google/pprof/internal/driver/cli.go:24:2: use of internal package github.com/google/pprof/internal/plugin not allowed
/usr/local/go/src/cmd/vendor/github.com/google/pprof/internal/driver/commands.go:30:2: use of internal package github.com/google/pprof/internal/report not allowed
/usr/local/go/src/cmd/vendor/github.com/google/pprof/internal/driver/options.go:27:2: use of internal package github.com/google/pprof/internal/symbolizer not allowed
can't load package: /usr/local/go/src/cmd/vendor/github.com/google/pprof/internal/graph/graph.go:26:2: non-standard import "github.com/google/pprof/profile" in standard package "cmd/vendor/github.com/google/pprof/internal/graph"
/usr/local/go/src/cmd/vendor/github.com/google/pprof/internal/graph/dotgraph.go:24:2: use of internal package github.com/google/pprof/internal/measurement not allowed
can't load package: /usr/local/go/src/cmd/vendor/github.com/google/pprof/internal/measurement/measurement.go:24:2: non-standard import "github.com/google/pprof/profile" in standard package "cmd/vendor/github.com/google/pprof/internal/measurement"
can't load package: /usr/local/go/src/cmd/vendor/github.com/google/pprof/internal/plugin/plugin.go:24:2: non-standard import "github.com/google/pprof/profile" in standard package "cmd/vendor/github.com/google/pprof/internal/plugin"
can't load package: /usr/local/go/src/cmd/vendor/github.com/google/pprof/internal/report/report.go:33:2: non-standard import "github.com/google/pprof/profile" in standard package "cmd/vendor/github.com/google/pprof/internal/report"
/usr/local/go/src/cmd/vendor/github.com/google/pprof/internal/report/report.go:30:2: use of internal package github.com/google/pprof/internal/graph not allowed
/usr/local/go/src/cmd/vendor/github.com/google/pprof/internal/report/report.go:31:2: use of internal package github.com/google/pprof/internal/measurement not allowed
/usr/local/go/src/cmd/vendor/github.com/google/pprof/internal/report/report.go:32:2: use of internal package github.com/google/pprof/internal/plugin not allowed
can't load package: /usr/local/go/src/cmd/vendor/github.com/google/pprof/internal/symbolizer/symbolizer.go:32:2: non-standard import "github.com/google/pprof/profile" in standard package "cmd/vendor/github.com/google/pprof/internal/symbolizer"
/usr/local/go/src/cmd/vendor/github.com/google/pprof/internal/symbolizer/symbolizer.go:29:2: use of internal package github.com/google/pprof/internal/binutils not allowed
/usr/local/go/src/cmd/vendor/github.com/google/pprof/internal/symbolizer/symbolizer.go:30:2: use of internal package github.com/google/pprof/internal/plugin not allowed
/usr/local/go/src/cmd/vendor/github.com/google/pprof/internal/symbolizer/symbolizer.go:31:2: use of internal package github.com/google/pprof/internal/symbolz not allowed
can't load package: /usr/local/go/src/cmd/vendor/github.com/google/pprof/internal/symbolz/symbolz.go:30:2: non-standard import "github.com/google/pprof/profile" in standard package "cmd/vendor/github.com/google/pprof/internal/symbolz"
/usr/local/go/src/cmd/vendor/github.com/google/pprof/internal/symbolz/symbolz.go:29:2: use of internal package github.com/google/pprof/internal/plugin not allowed
can't load package: /usr/local/go/src/cmd/vendor/golang.org/x/crypto/ssh/terminal/util.go:20:2: non-standard import "golang.org/x/sys/unix" in standard package "cmd/vendor/golang.org/x/crypto/ssh/terminal"

Can you please add install instructions to README.md?

@Ullaakut
Copy link
Owner

Mh, I'm also on MacOS and with the same go version as you, and it works fine for me 🤔I'll add a section on building the tool, but here there's no reason it wouldn't work if you have a proper go version and the GO111MODULE variable set to on.

My guess here is that it's because you're running your build as sudo.

Try running go build -o gorsair cmd/*.go without sudo, while making sure that your environment is set properly.

@vitalysim
Copy link
Author

I had the environment variable set to "on" and run it without sudo still the same output.
But with go build -o gorsair cmd/*.go it worked

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

No branches or pull requests

2 participants