Command not found go — on Mac after installing Go

后端 未结 7 2062
逝去的感伤
逝去的感伤 2021-02-03 18:24

I want to use Go, but I\'m having trouble running the go command. I installed go1.5.2 darwin/amd64, but when I run the command go version, I get an error in the ter

7条回答
  •  执念已碎
    2021-02-03 19:15

    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
    

    you should then source you .zshrc file:

    . ~/.zshrc
    

提交回复
热议问题