Error "command not found" after installing go-eval


I’m trying to run Go in an interactive mode.

I want to use go-eval for that, I followed their README instructions:

  • I ran go get successfully
  • I ran go-eval which resulted in -bash: go-eval: command not found

Some more information:

  • echo $PATH returns: /usr/local/go/bin:...

  • echo $GOPATH returns: $HOME/golang

  • running whereis go-eval returns no output

  • running go install go-eval returns:

    can't load package: package go-eval: cannot find package "go-eval" in any of:
    /usr/local/go/src/go-eval (from $GOROOT)
    $HOME/golang/src/go-eval (from $GOPATH)


You’ll need to add GOPATH/bin to PATH.


Update [Go 1.8 and above]: GOPATH will default to $HOME/go. The above will not work if GOPATH is not explicitly set.

To set both, add this to your .profile file:

export GOPATH="$HOME/go"

Answered By – user1431317

Answer Checked By – Gilberto Lyons (GoLangFix Admin)

Leave a Reply

Your email address will not be published.