cannot download, /home/azhukov/go is a GOROOT, not a GOPATH


問題詳情:

go環境安裝好后,運行go代碼也沒有問題

下載govendor包的時候提示:

cannot download, /home/azhukov/go is a GOROOT, not a GOPATH

 

解決方法:

This error is caused by the go tool detecting a Go installation in your GOPATH. It's not telling you that your GOPATH is the GOROOT (that's a different message), it's telling your GOPATH looks like aGOROOT.

Cleaning out your GOPATH and running go get again will fix the error.

查看GOROOT和GOPATH配置均沒有問題,后發現GOPATH文件夾下目錄結構和GOROOT一樣,不知道何時go在GOPATH下也安裝了。

刪除GOPATH文件夾下所有文件,重新執行命令,問題解決。

~

https://stackoverflow.com/questions/42809990/go-get-cannot-download-home-azhukov-go-is-a-goroot-not-a-gopath


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM