我正在學習 Go,但遇到了一些問題。我關注go install但是一個錯誤:no install location for directory /Users/skan/documents/study/golang/src/section1 outside GOPATHFor 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”elseif [ -f ”/anaconda3/etc/profile.d/conda.sh” ]; then. ”/anaconda3/etc/profile.d/conda.sh”CONDA_CHANGEPS1=false conda activate baseelse\export PATH=”/anaconda3/bin:$PATH:$GOPATH:$GOBIN”fifiunset __conda_setup# <<< conda init <<<export GOPATH="/Users/skan/Documetns/study/golang"export GOBIN=$GOPATH/bin
1 回答

紅顏莎娜
TA貢獻1842條經驗 獲得超13個贊
嘗試:
mkdir -p $GOPATH/bin
您看到的錯誤是安裝目錄不存在,因此 install 無法執行任何操作。
另外,這里有個錯別字:
export GOPATH="/Users/skan/Documetns/study/golang"
所以,同樣的推理,但是,試試Documents
- 1 回答
- 0 關注
- 153 瀏覽
添加回答
舉報
0/150
提交
取消