zsh: command not found: 解决方法

问题原有:mac中安装了my zsh [http://www.javashuo.com/article/p-yfmifxwy-p.html] ,可是形成了在使用vscode的时候,提示”zsh: command not found“html

缘由是两个不一样的终端环境变量不同。shell

解决方法:vim

把 bash shell 中.bash_profile 所有环境变量加入zsh shell里就好bash

一、spa

cat .bash_profile

# Setting PATH for Python 3.5
# The orginal version is saved in .bash_profile.pysave
#PATH="/Library/Frameworks/Python.framework/Versions/3.5/bin:${PATH}"
#export PATH
export GOPATH=$HOME/go
GOROOT=/usr/local/go
export GOROOT
#GOROOT bin
export PATH=$PATH:$GOROOT/bin
#GOPATH bin
export PATH=$PATH:$GOPATH/bin
export PATH="/usr/local/opt/openssl/bin:$PATH"

将上述中涉及到的go环境变量加入到zash环境变量中去。code

二、htm

vim .zshrc
#在最下面加入go环境变量便可

#export PATH
export GOPATH=$HOME/go
GOROOT=/usr/local/go
export GOROOT
#GOROOT bin
export PATH=$PATH:$GOROOT/bin
#GOPATH bin
export PATH=$PATH:$GOPATH/bin
export PATH="/usr/local/opt/openssl/bin:$PATH"

三、生效配置blog

source .zshrc
相关文章
相关标签/搜索