英文:
zsh: command not found: go | installed go but not showing in terminal
问题
当你尝试安装Go并在终端中检查时,会出现以下错误:
zsh: command not found: go
你已经安装了Go,但在终端中没有显示。
英文:
When you will try to install the go and you check it in your terminal
This error will show up
zsh: command not found: go
You installed go but not showing in terminal
答案1
得分: 2
打开终端
nano ~/.zshrc
将以下内容添加到其中
export PATH=$PATH:/usr/local/go/bin
export PATH=$PATH:$GOPATH/bin
按下Ctrl + X退出,然后点击Yes
打开新的终端并使用以下命令进行检查
go version
英文:
Open terminal
nano ~/.zshrc
Add this to it
export PATH=$PATH:/usr/local/go/bin
export PATH=$PATH:$GOPATH/bin
Exit with Cntrl + X then click Yes
Open new terminal and check with
go version
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论