[Mac] 解決 zsh: command not found : XXX

zsh: command not found:xxx

查看環境變數

printenv
SHELL=/bin/zsh

zsh 加入 環境變數 path舉例 (GVM 安裝 go)

安裝 GVM 安裝go

  1. 安裝 (這裡是使用zsh進行)
zsh < <(curl -s -S -L https://raw.githubusercontent.com/moovweb/gvm/master/binscripts/gvm-installer)
source /Users/<User name>/.gvm/scripts/gvm
vim ~/.zshrc
...
...
#最底下加入gvm環境變數路徑
source /Users/<User name>/.gvm/scripts/gvm
[[-s“/Users/<User name>/.gvm/scripts/gvm”]] && source“/Users/<User name>/.gvm/scripts/gvm”

執行確認gvm安裝成功

$ gvm versionGo Version Manager v1.0.22 installed at /Users/<User name>/.gvm

--

--

--

工程師斜槓山岳攝影師,

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Frank Lin

Frank Lin

工程師斜槓山岳攝影師,

More from Medium

Multiple Git accounts VS a single Mac

Oh-My-Zsh and Themes

Dev Diaries: .NET Development on a MacBook Pro M1

Customizing your development terminal