zsh: command not found: go | installed go but not showing in terminal

huangapple go评论81阅读模式
英文:

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

huangapple
  • 本文由 发表于 2022年11月14日 21:56:28
  • 转载请务必保留本文链接:https://go.coder-hub.com/74432789.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定