Environment configuration:
RyanMacbookPro:work$ env | grep GO
GOBIN=/usr/local/go/bin
GOARCH=amd64
GOROOT=/usr/local/go
GOOS=darwin
GOPATH=/Users/ryan/go
Perform installation
sudo go get github.com/nsf/gocode
prompt:
cannot download, $GOPATH not set. For more details see: go help gopath
solution:
sudo env GOPATH=/Users/ryan/go go get github.com/nsf/gocode
Similar Posts:
- Gopath not set in go command execution
- cmd/go: unsupported GOOS/GOARCH pair linux /amd64 [How to Solve]
- Intellij IDEA Golang Error: no Go files in D:\basic_tool\Go\src\gosvc
- [Solved] Go Language Error: cannot find module providing package github.com/
- Go build cannot find package Error [How to Solve]
- [Solved] NPM installation error: error: eacces: permission denied
- [Solved] python Connect Oracle Error: DPI-1047
- Go Language compilation and installation protobuf: protoc-gen-go: program not found or is not executable
- [Solved] Mac Install uwsgi Error: clang: error: no such file or directory: ‘/Users/steven/PycharmProjects/pythonProject/venv/lib/python3.8/config-3.8/libpython3.8.a’
- Go Project Start Error: package not in GOROOT & import cycle not allowed