constabulary / gb

gb, the project based build tool for Go
https://getgb.io/
MIT License
2.15k stars 150 forks source link

gb install failed on mac #701

Closed yuchaoran2011 closed 7 years ago

yuchaoran2011 commented 7 years ago

I tried the the go get command to install gb. The command ran without giving any output, so I supposed the installation was successful. But when I ran "gb", I got error "gb: command not found". I checked under /usr/local/go/, which is my GOPATH, gb is not there.

More context: I installed Go using the GUI installer provided on the official website. I've verified that the installer did set GOPATH correctly and put it in PATH as well. I got "go version go1.8 darwin/amd64" after running "go version"

I also tried to clone the gb repo and use "go build" and then "go install" to install it, but the build failed with error "use of internal package not allowed".

Can anyone help me here?

dcheney-atlassian commented 7 years ago

Can you please post the complete output of

go install -v github.com/constabulary/gb/...

yuchaoran2011 commented 7 years ago

I just tried the command. The -v flag didn't seem to help. I got nothing in the output. The command seemed to have succeeded, but gb was still not installed.

dcheney-atlassian commented 7 years ago

I got nothing in the output.

ok, if there was no output then there is nothing to compile. Check that $GOPATH/bin/ is your $PATH

yuchaoran2011 commented 7 years ago

I found ":/usr/local/go/bin:" as a substring of "echo $PATH".

yuchaoran2011 commented 7 years ago

$GOPATH is not defined in my environment though, but $GOPATH/bin/ is in the $PATH

dcheney-atlassian commented 7 years ago

Then you need to add $HOME/go/bin to your path.

I've raised a bug on the Go project as this is no longer mentioned in the installation instructions.

yuchaoran2011 commented 7 years ago

Thanks for the prompt help! It's working now!