Resolving "Command Not Found" Error after Installing Go-eval
During the installation of go-eval, you may encounter an error stating "go-eval: command not found." To resolve this, you'll need to ensure that the go-eval executable is accessible in your system's path.
Go-eval has its binary stored in GOPATH/bin, which is not automatically included in PATH. To add it, follow these steps:
Append GOPATH/bin to PATH:
PATH="$GOPATH/bin:$PATH"
Note:
Set GOPATH and PATH in .profile (Go 1.8 and above):
Go 1.8 and above default GOPATH to $HOME/go. This means the previous method will not work. To set both GOPATH and PATH correctly, add the following lines to your .profile file:
export GOPATH="$HOME/go" PATH="$GOPATH/bin:$PATH"
Once your path is updated, you should be able to run go-eval from any directory within your system.
The above is the detailed content of Why Can't I Find the `go-eval` Command After Installation?. For more information, please follow other related articles on the PHP Chinese website!