Home > Article > Backend Development > Why isn't "go install" working with zsh?
Diagnosing "Go install not working with zsh" Issue
When attempting to install "go" using zsh, some users may encounter the error "zsh: command not found: go." This issue typically arises due to an incorrect or incomplete configuration. Let's delve deeper into the problem and its solution.
The provided configuration includes the following files:
However, if "go" was installed through the macOS package installer rather than Homebrew, the following modifications are necessary:
The updated "~/.zshrc" file should look like this:
export GOPATH=$HOME/go export GOROOT=/usr/local/go export GOBIN=$GOPATH/bin export PATH=$PATH:$GOPATH export PATH=$PATH:$GOROOT/bin
After making these changes, the "go install" command should work as expected in zsh.
The above is the detailed content of Why isn't "go install" working with zsh?. For more information, please follow other related articles on the PHP Chinese website!