如何在Ubuntu上安装Go和goisntall以进行Doozer安装

huangapple go评论90阅读模式
英文:

How to install go and goisntall on ubuntu for doozer install

问题

我正在使用ubuntu 10.04和12.04。

我正在尝试安装doozer和doozed,但是我在处理go install时遇到了困难。我需要为安装制作一个chef recipe。

安装doozer的指令如下:

goinstall github.com/ha/doozer

我如何获取goinstall?

编辑:使用Go 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)

英文:

I am using ubuntu 10.04 and 12.04.

I am tryig to install doozer and doozed and I am having a hard time dealing with go isntall. I will need to make a chef recipe for the install.

The directions for installing doozer as follows:

goinstall github.com/ha/doozer

How to I get goinstall?

EDIT: Using Go 1.0.2 and go install, I get the following output:

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)

答案1

得分: 2

doozerdoozerd包使用了一个旧的、过时的Go版本。要获取当前版本的源代码Go 1,请执行以下命令:

go get -v github.com/ha/doozer

go get -v github.com/ha/doozerd

将源代码升级到Go 1,然后使用go install命令:

go install -v github.com/ha/doozer

go install -v github.com/ha/doozerd

此外,pretty.go已被重命名为pretty

请参阅Command go

英文:

The doozer and doozerd packages use an old, obsolete version of Go. For the current version, Go 1, get the source code:

go get -v github.com/ha/doozer

go get -v github.com/ha/doozerd

Upgrade the source code to Go 1 and then use go install:

go install -v github.com/ha/doozer

go install -v github.com/ha/doozerd

Also, pretty.go has been renamed to pretty:

See Command go.

答案2

得分: 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是一个管理Go源代码的工具。

用法:

    go 命令 [参数]

命令有:

    build       编译包和依赖项
    clean       删除目标文件
    doc         在包源代码上运行godoc
    env         打印Go环境信息
    fix         在包上运行go tool fix
    fmt         在包源代码上运行gofmt
    get         下载并安装包和依赖项
    install     编译并安装包和依赖项
    list        列出包
    run         编译并运行Go程序
    test        测试包
    tool        运行指定的go工具
    version     打印Go版本
    vet         在包上运行go tool vet

使用“go help [命令]”获取有关命令的更多信息。

附加帮助主题:

    gopath      GOPATH环境变量
    packages    包列表的描述
    remote      远程导入路径语法
    testflag    测试标志的描述
    testfunc    测试函数的描述

使用“go help [主题]”获取有关该主题的更多信息。
英文:

Just for reference (go to prepare)

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

huangapple
  • 本文由 发表于 2012年7月7日 08:14:56
  • 转载请务必保留本文链接:https://go.coder-hub.com/11371199.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定