Unrecognized Import Paths with go get
When attempting to install the web.go package using go get github.com/hoisie/web, you may encounter numerous "unrecognized import path" errors. This issue stems from an incorrect GOROOT setting.
Solution:
export GOROOT=/usr/local/go export GOPATH=$HOME/go export PATH=$PATH:$GOROOT/bin
This should resolve the problem and allow you to install web.go successfully using go get.
Alternative Solution:
Alternatively, you can install Go using the Ubuntu package manager:
sudo apt-get install golang
Please refer to the video tutorial at http://www.youtube.com/watch?v=2PATwIfO5ag for further assistance.
The above is the detailed content of Why Am I Getting 'Unrecognized Import Path' Errors When Using `go get`?. For more information, please follow other related articles on the PHP Chinese website!