2012-07-07 60 views
0

我使用的是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) 

回答

2

doozerdoozerd包使用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

Command go

+0

您好,我安裝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

+0

我安裝很漂亮btw。 go install -v github.com/kr/pretty – Tampa 2012-07-07 03:23:48

+0

由於'pretty.go'包已經重命名爲'pretty',因此將'conn.go'的第7行從''github.com/kr/pretty.go''換成''到'「github.com/kr/pretty」'。 – peterSO 2012-07-07 04:07:04

0

僅供參考(去準備)

$ 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.