Go not recognizing Goose installed on ubuntu 18.04

I have installed golang and goose on the ubuntu 18.04 LTS but go is not able to recognize goose installed on this machine. I have tried to export CGO_ENABLED=0. found on some threads and I have followed some other threads eg https://www.reddit.com/r/learnprogramming/comments/d9rlfv/go_python_goose_data_migration_i_cant_get_goose/f1n7op4/

Here is relevant information

ubuntu@ip-172-31-4-67:~$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/ubuntu/.cache/go-build"
GOENV="/home/ubuntu/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/ubuntu/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build679517783=/tmp/go-build -gno-record-gcc-switches"
ubuntu@ip-172-31-4-67:~$ cd /home/ubuntu/go
ubuntu@ip-172-31-4-67:~/go$ ls
bin  pkg  src
ubuntu@ip-172-31-4-67:~/go$ cd src/
ubuntu@ip-172-31-4-67:~/go/src$ ls
github.com
ubuntu@ip-172-31-4-67:~/go/src$ cd github.com/
ubuntu@ip-172-31-4-67:~/go/src/github.com$ ls
mattn  pressly
ubuntu@ip-172-31-4-67:~/go/src/github.com$ cd pressly/
ubuntu@ip-172-31-4-67:~/go/src/github.com/pressly$ ls
goose
ubuntu@ip-172-31-4-67:~/go/src/github.com/pressly$ goose
goose: command not found
ubuntu@ip-172-31-4-67:~/go/src/github.com/pressly$

Any help or guidance is really appreciated

Edit: Here is more info

 echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/usr/local/go/bin:/usr/local/go/bin:~/go/src/github.com/pressly/goose:/usr/local/go/bin:/home/ubuntu/go/src/github.com/pressly/goose

after defining go path, I was able to run goose command. below are the change in base .profile file
#export PATH=$PATH:/usr/local/go/bin
export GOPATH=$HOME/projects
export PATH=$PATH:/usr/local/go/bin:$GOPATH/bin

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.