如何在Ubuntu上安装go和goisntall进行doozer安装
问题描述:
我使用的是Ubuntu 10.04和12.04。如何在Ubuntu上安装go和goisntall进行doozer安装
我尝试安装doozer和doozed,我很难处理go isntall。我需要为安装做一个厨师食谱。
goinstall github.com/ha/doozer
如何我得到goinstall:
安装道崎如下的方向?
编辑:使用转到1.0.2和go install
,我得到下面的输出:
github.com/ha/doozer
# github.com/ha/doozer
/usr/local/go/src/pkg/github.com/ha/doozer/conn.go:184: cannot use &t.req (type *request) as type proto.Message in function argument:
*request does not implement proto.Message (missing ProtoMessage method)
/usr/local/go/src/pkg/github.com/ha/doozer/conn.go:198: cannot use &r (type *response) as type proto.Message in function argument:
*response does not implement proto.Message (missing ProtoMessage method)
/usr/local/go/src/pkg/github.com/ha/doozer/conn.go:294: undefined: proto.GetInt64
/usr/local/go/src/pkg/github.com/ha/doozer/conn.go:326: undefined: proto.GetInt64
/usr/local/go/src/pkg/github.com/ha/doozer/conn.go:412: undefined: proto.GetInt32
/usr/local/go/src/pkg/github.com/ha/doozer/conn.go:412: undefined: proto.GetInt64
/usr/local/go/src/pkg/github.com/ha/doozer/err.go:33: cannot call non-function proto.GetString (type struct {})
/usr/local/go/src/pkg/github.com/ha/doozer/msg.pb.go:127: cannot use this (type *request) as type proto.Message in function argument:
*request does not implement proto.Message (missing ProtoMessage method)
/usr/local/go/src/pkg/github.com/ha/doozer/msg.pb.go:142: cannot use this (type *response) as type proto.Message in function argument:
*response does not implement proto.Message (missing ProtoMessage method)
答
的doozer
和doozerd
包使用Go的旧的,过时的版本。对于最新版本,请1,获取源代码:
go get -v github.com/ha/doozer
go get -v github.com/ha/doozerd
升级的源代码,进入1然后用go install
:
go install -v github.com/ha/doozer
go install -v github.com/ha/doozerd
此外,pretty.go
已更名为pretty
:
答
仅供参考(去准备)
$ cd /var/tmp
$ wget http://go.googlecode.com/files/go1.0.2.linux-386.tar.gz
$ tar xvfz go1...tar.gz
$ export GOROOT=/var/tmp/go
$ export PATH=$PATH:$GOROOT/bin
$ go
Go is a tool for managing Go source code.
Usage:
go command [arguments]
The commands are:
build compile packages and dependencies
clean remove object files
doc run godoc on package sources
env print Go environment information
fix run go tool fix on packages
fmt run gofmt on package sources
get download and install packages and dependencies
install compile and install packages and dependencies
list list packages
run compile and run Go program
test test packages
tool run specified go tool
version print Go version
vet run go tool vet on packages
Use "go help [command]" for more information about a command.
Additional help topics:
gopath GOPATH environment variable
packages description of package lists
remote remote import path syntax
testflag description of testing flags
testfunc description of testing functions
Use "go help [topic]" for more information about that topic.
您好,我安装go1.0.2.linux-amd64.tar.gz。我得到这个错误。 go install -v github.com/ha/doozerd /usr/local/go/src/pkg/github.com/ha/doozer/conn.go:7:2:no在/ usr/local/go中找到源文件/src/pkg/github.com/kr/pretty.go – Tampa 2012-07-07 03:18:04
我安装很漂亮btw。 go install -v github.com/kr/pretty – Tampa 2012-07-07 03:23:48
由于'pretty.go'包已经重命名为'pretty',因此将'conn.go'的第7行从''github.com/kr/pretty.go''换成''到'“github.com/kr/pretty”'。 – peterSO 2012-07-07 04:07:04