问题
I'm a beginner in Go and I would like to use the Revel web framework. I installed: Git; Mercurial and even: Bazaar and CVS.
I checked my environment variables. I set environment variable GOPATH to D:\Go and added D:\Go\bin to PATH.But I still get these errors when I go get The Revel Framework (go get github.com/revel/revel)
**
package golang.org/x/net/websocket: unrecognized import path "golang.org/x/net/websocket"
package gopkg.in/fsnotify.v1: unrecognized import path "gopkg.in/fsnotify.v1"**
回答1:
For instalation of GO into your home folder you need this environment variables:
.
├── bin
├── go (GO)
└── src
├── revel.project
│ ├── app
│ │ ├── controllers
│ │ ├── models
│ │ ├── routes
│ │ ├── tmp
│ │ └── views
│ │ ├── admin
│ │ ├── App
│ │ ├── errors
│ │ └── users
│ ├── conf
│ ├── messages
│ ├── public
│ │ ├── css
│ │ │ └── administrator
│ │ ├── img
│ │ ├── js
│ │ └── uploads
│ │ └── 1
│ ├── resources
│ ├── scripts
│ ├── test-results
│ └── tests
├── code.google.com
├── github.com
│ ├── revel
│ │ ├── cmd
│ │ ├── modules
│ │ └── revel
run this in your prompt path or modify if your folders are differents.
export GOARCH=amd64
export GOPATH=~/go
export GOBIN=~/go/go/bin
export GOROOT=~/go/go
export PATH=$PATH:$GOPATH/go/bin
export GOTOOLDIR=~/go/go/pkg/tool/linux_amd64
export CC="gcc"
export GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0"
export CXX=g++
export CGO_ENABLED=1
Where ~ is the name of you personal folder in the system (Bash Gnu Linux)
来源:https://stackoverflow.com/questions/29843116/cant-install-revel-unrecognized-import-path