「go install」と入力すると、このエラーメッセージが表示されます。GoLang:インストール時にこのエラーが発生する
[email protected]:~/Scripts/Enum/gobuster# go install
go install: no install location for directory /root/Scripts/Enum/gobuster outside GOPATH
For more details see: go help gopath
My 'go env'は次のとおりです。
[email protected]:~/Scripts/Enum/gobuster# go env
GOARCH="386"
GOBIN=""
GOEXE=""
GOHOSTARCH="386"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/root"
GORACE=""
GOROOT="/usr/lib/go"
GOTOOLDIR="/usr/lib/go/pkg/tool/linux_386"
GO15VENDOREXPERIMENT="1"
CC="gcc"
GOGCCFLAGS="-fPIC -m32 -pthread -fmessage-length=0"
CXX="g++"
CGO_ENABLED="1"
誰かが助けてくれますか? ありがとうございます。
あなたのコードは、あなたのGOPATHではありません。 '$ GOPATH/src /'のサブディレクトリにある必要があります。 [Go Codeの書き方](https://golang.org/doc/code.html) – JimB
JimBありがとうございました。 –