HiveBrain v1.2.0
Get Started
← Back to all entries
patterngoCritical

Command not found go — on Mac after installing Go

Submitted by: @import:stackoverflow-api··
0
Viewed 0 times
installingfoundnotaftercommandmac

Problem

I installed go1.5.2 darwin/amd64, but when I run the command go version, I get an error in the terminal zsh: command not found: go.

I added the path export PATH=$PATH:/usr/local/go/bin to the bash profile, but I still get the error (I restarted the terminal btw).

I uninstalled and reinstalled, but no luck.

Solution

Like bjhaid mentioned in the comments above:

This is happening because you must add your PATH to your ~/.zshrc file.

in the ~/.zshrc you should add the line:

export PATH=$PATH:/usr/local/go/bin
export PATH=$PATH:$GOPATH/bin


you should then source you .zshrc file:

. ~/.zshrc

Code Snippets

export PATH=$PATH:/usr/local/go/bin
export PATH=$PATH:$GOPATH/bin

Context

Stack Overflow Q#34708207, score: 236

Revisions (0)

No revisions yet.