「Windows10」パッケージ管理scoopでgo言語をインストールする
環境
Windows 10 Home 64bit
scoop v0.2.2
操作方法
1.scoopバージョンを確認します。
PS C:\> scoop --version Current Scoop version: v0.2.2 - Released at 2022-06-21
2.インストール可能goバージョンを確認します。
PS C:\> scoop search go 'main' bucket: argo (3.3.8) argocd-autopilot (0.3.9) argocd (2.4.3) centrifugo (3.2.2) danser-go (0.7.0) gauche (0.9.12) --> includes 'gosh.exe' global (6.6.8) --> includes 'gozilla.exe' go-containerregistry (0.10.0) go-ipfs (0.13.0) go-jsonnet (0.18.0) go-swagger (0.29.0) go (1.18.3) 略
3.go言語をインストールします
PS C:\> scoop install go Installing 'go' (1.18.3) [64bit] go1.18.3.windows-amd64.zip (147.8 MB) [=======================================================================] 100% Checking hash of go1.18.3.windows-amd64.zip ... ok. Extracting go1.18.3.windows-amd64.zip ... done. Running installer script... Linking ~\scoop\apps\go\current => ~\scoop\apps\go\1.18.3 Creating shim for 'go'. Creating shim for 'gofmt'. 'go' (1.18.3) was installed successfully! Notes ----- Your GOROOT has been set to: C:\Users\arkgame\scoop\apps\go\current You can run 'go env GOROOT' to view this at any time. "$env:USERPROFILE\go\bin" has been added to your PATH.
4.go環境パスを設定します
PS C:\> go env GOROOT C:\Users\arkgame\scoop\apps\go\current
5.goバージョンを確認します。
PS C:\> go version go version go1.15.6 windows/amd64