I'm trying to install a
web.go, but running
go get github.com/hoisie/web returns
package bufio: unrecognized import path "bufio" package bytes: unrecognized import path "bytes" package crypto/rand: unrecognized import path "crypto/rand" package crypto/sha1: unrecognized import path "crypto/sha1" package crypto/tls: unrecognized import path "crypto/tls" package encoding/base64: unrecognized import path "encoding/base64" package encoding/binary: unrecognized import path "encoding/binary" package encoding/json: unrecognized import path "encoding/json" package errors: unrecognized import path "errors" package fmt: unrecognized import path "fmt"
and this continues for a while with various packages, before returning nothing else.
go env gives me:
GOARCH="amd64" GOBIN="/usr/local/go/bin" GOCHAR="6" GOEXE="" GOHOSTARCH="amd64" GOHOSTOS="linux" GOOS="linux" GOPATH="" GORACE="" GOROOT="/home/me/go" GOTOOLDIR="/home/me/go/pkg/tool/linux_amd64" TERM="dumb" CC="gcc" GOGCCFLAGS="-g -O2 -fPIC -m64 -pthread" CXX="g++" CGO_ENABLED="1"
How can I install
go get (rather than
go install) is what is in the README on the github page. My Go version is
go version go1.2 linux/amd64.
This question is tagged with
~ Asked on 2013-12-08 20:41:49
The issues are relating to an invalid
I think you installed Go in
So change your
GOROOT path to the value of
It seems that you meant to have your workspace (GOPATH) located at
This might fix your problem.
Add this to the bottom of your bash profile, located here =>
export GOROOT=/usr/local/go export GOPATH=$HOME/go export PATH=$PATH:$GOROOT/bin
Make sure to remove the old references of
Then try installing web.go again.
If that doesn't work, then have Ubuntu install Go for you.
sudo apt-get install golang
Video tutorial: http://www.youtube.com/watch?v=2PATwIfO5ag
~ Answered on 2013-12-08 22:11:02
I installed Go with
brew on OSX 10.11, and found I had to set
(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.
~ Answered on 2015-11-10 06:54:17