Resolving "Command not found go" Prompt after Installing Go on Mac
Despite installing Go on your Mac, attempts to execute the "go version" command result in the error "command not found: go." This error persists despite modifying your bash profile with the path "export PATH=$PATH:/usr/local/go/bin."
To rectify this issue, follow these steps:
Add the following lines:
export PATH=$PATH:/usr/local/go/bin export PATH=$PATH:$GOPATH/bin
Refresh the .zshrc file by executing the command:
. ~/.zshrc
By modifying the ~/.zshrc file and adding the appropriate path, the Mac will recognize the Go executable and allow you to utilize the Go command-line tools.
The above is the detailed content of Why Doesn't 'go version' Work After Installing Go on My Mac?. For more information, please follow other related articles on the PHP Chinese website!