英文:
Can't install Revel with go get
问题
我的go env
:
GOARCH="amd64"
GOBIN=""
GOCHAR="6"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/xamenrax/code/golang"
GORACE=""
GOROOT="/usr/local/Cellar/go/1.3.2/libexec"
GOTOOLDIR="/usr/local/Cellar/go/1.3.2/libexec/pkg/tool/darwin_amd64"
CC="clang"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fno-common"
CXX="clang++"
CGO_ENABLED="1"
但是当我运行go get github.com/robfig/revel
时,没有任何输出,这个命令只是静默地不执行任何操作。
英文:
My go env
:
GOARCH="amd64"
GOBIN=""
GOCHAR="6"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/xamenrax/code/golang"
GORACE=""
GOROOT="/usr/local/Cellar/go/1.3.2/libexec"
GOTOOLDIR="/usr/local/Cellar/go/1.3.2/libexec/pkg/tool/darwin_amd64"
CC="clang"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fno-common"
CXX="clang++"
CGO_ENABLED="1"
But where I'm doing go get github.com/robfig/revel
there is no any output, this command just silently do nothing.
答案1
得分: 2
它什么都不做,只是检查$GOPATH/src/github.com/robfig/revel
文件夹的内容。
如果该文件夹存在,那么go get
很可能已经下载、编译并安装了你的项目。
解决方法是手动执行以下步骤:
-
在
$GOPATH/src/github.com
目录下创建一个robfig
文件夹, -
在该
robfig
文件夹中,尝试执行以下命令:git clone https://github.com/robfig/revel
-
然后在
revel
文件夹中,尝试执行go build
,然后执行go install
如下所述:
> go build
命令应该从$GOPATH/src/github.com/robfig/revel/revel
目录下执行。
英文:
It does nothing, but check the content of the $GOPATH/src/github.com/robfig/revel
folder.
If that folder exists, chances are the go get
did download, compile and install your project.
The workaround is to do it manually:
-
create a
robfig
folder in$GOPATH/src/github.com
, and -
in that
robfig
folder, try:git clone https://github.com/robfig/revel
-
Then in the
revel
folder, try ago build
, thengo install
As commented below:
> go build
command should be executed from $GOPATH/src/github.com/robfig/revel/revel
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论