“unrecognized import path” with go get

后端 未结 9 784
你的背包
你的背包 2020-12-07 18:00

I\'m trying to install a web.go, but running go get github.com/hoisie/web returns

package bufio: unrecognized import path \"bufio\"         


        
9条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-07 18:40

    I installed Go with brew on OSX 10.11, and found I had to set GOROOT to:

    /usr/local/Cellar/go/1.5.1/libexec

    (Of course replace the version in this path with go version you have)

    Brew uses symlinks, which were fooling the gotool. So follow the links home.

提交回复
热议问题