scc icon indicating copy to clipboard operation
scc copied to clipboard

Missing packages during build ...

Open psalvitti opened this issue 8 years ago • 3 comments

Building via go build, receive the following errors:

main.go:4:2: cannot find package "github.com/boyter/scc/processor" **in** any of: /usr/local/Cellar/go/1.10.2/libexec/src/github.com/boyter/scc/processor (from $GOROOT) /Users/myuser/go/src/github.com/boyter/scc/processor (from $GOPATH) main.go:5:2: cannot find package "github.com/urfave/cli" **in** any of: /usr/local/Cellar/go/1.10.2/libexec/src/github.com/urfave/cli (from $GOROOT) /Users/myuser/go/src/github.com/urfave/cli (from $GOPATH)

Problem is fixed by installing necessary dependencies (as indicated above) with:

go get github.com/boyter/scc/processor github.com/urfave/cli

Build then works. I'm considering this a workaround and only added this issue as documentation for others that may (will?) run into this.

OS: macOS Sierra (10.12.6) go version: go1.10.2 darwin/amd64

PS: new to Go, bear with me if this is implicit.

psalvitti avatar Jun 05 '18 14:06 psalvitti

go get github.com/boyter/scc should get all dependencies.

nemith avatar Jun 05 '18 17:06 nemith

Hi @psalvitti as @nemith mentioned everything should be there. I have confirmed this in another machine just in case I was wrong.

Its more likely you cloned into another directory not the GOPATH. A go get github.com/boyter/scc then navigate to $GOPATH/src/github.com/boyter/scc and run go build should work.

boyter avatar Jun 05 '18 22:06 boyter

Feel free to reopen this if you are having issues, but see https://boyter.org/posts/how-to-start-go-project-2018/ if you need more help with GOPATH and the like.

boyter avatar Jun 05 '18 22:06 boyter