我正在学习 Go,但遇到了一些问题。
我关注
go install
但是一个错误:
no install location for directory /Users/skan/documents/study/golang/src/section1 outside GOPATH
For more details see: ’go help gopath’
所以我回到我的 .bash/profile
这是我的 .bash/profile
# added by Anaconda3 2018.12 installer
# >>> conda init >>>
# !! Contents within this block are managed by ’conda init’ !!
__conda_setup=”$(CONDA_REPORT_ERRORS=false ’/anaconda3/bin/conda’ shell.bash hook 2> /dev/null)”
if [ $? -eq 0 ]; then
\eval ”$__conda_setup”
else
if [ -f ”/anaconda3/etc/profile.d/conda.sh” ]; then
. ”/anaconda3/etc/profile.d/conda.sh”
CONDA_CHANGEPS1=false conda activate base
else
\export PATH=”/anaconda3/bin:$PATH:$GOPATH:$GOBIN”
fi
fi
unset __conda_setup
# <<< conda init <<<
export GOPATH="/Users/skan/Documetns/study/golang"
export GOBIN=$GOPATH/bin
红颜莎娜
相关分类