I\'m trying to run Go
in an interactive mode.
I want to use go-eval for that, I followed their README
instructions:
Is the binary go-eval
in $GOPATH/bin
? Are you running the command with $GOPATH/bin/
as your working directory? If not, thats likely the problem.
go get
& go install
installs go binaries (if any) in $GOPATH/bin
Check $GOPATH/bin
for the go-eval binary. If its there, try running it from $GOPATH/bin
with ./go-eval
. If that works, you're good.
In future, if you wish to run go binaries found in $GOPATH/bin
from anywhere in your shell, add the following to your .bashrc or profile:
export PATH=$PATH:$GOPATH/bin
Then restart your terminal or run . ~/.bashrc
or . /etc/profile
When running go install go-eval I get:
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 get the above error because go-eval is not in $HOME/golang/src/go-eval
. Running go get github.com/sbinet/go-eval/
will download the source to $GOPATH/src/github/sbinet/go-eval/
. If you want to run go install go-eval
, you have to specify the package name relevant to its position in the directory hierarchy in $GOPATH/src
.
e.g.
go install github/sbinet/go-eval