Please answer these questions before submitting your issue. Thanks!
go version)?1.6.3
go env)?darwin
I tried to install gomobile as follow:
$ go get golang.org/x/mobile/cmd/gomobile
$ gomobile init
when i run gomobile init, i get "-bash: gomobile: command not found" as response
It seems that you didn't add GOPATH/bin to your PATH
add a line in your .bash_profile or .zshrc:
export PATH=$PATH:$GOPATH/bin
and the reopen the terminal
@raphael10241024 it works.thks
@raphael10241024 please help me
longtran@longtran:~$ gomobile init
gomobile: command not found
longtran@longtran:~$ go env
GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/longtran/go"
GORACE=""
GOROOT="/usr/local/go"
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build122730492=/tmp/go-build -gno-record-gcc-switches"
CXX="g++"
CGO_ENABLED="1"
PKG_CONFIG="pkg-config"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
longtran@longtran:~$ gomobile init
gomobile: command not found
You can try like below
export PATH=$PATH:$HOME/go/bin
I had issues with the $GOPATH var and this worked for me
@ragavendra, thank you, sir. Worked for me.
Most helpful comment
You can try like below
export PATH=$PATH:$HOME/go/binI had issues with the $GOPATH var and this worked for me