无法运行goinstall

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

unable to run goinstall

问题

goinstall go-tour.googlecode.com/hg/gotour

运行上述命令会给我以下消息..

goinstall: encoding/json: go/build: 无法在本地找到包
goinstall: code.google.com/p/go-tour/pic: 无法下载: code.google.com/p/go-tour/pic
goinstall: code.google.com/p/go-tour/tree: 无法下载: code.google.com/p/go-tour/tree
goinstall: code.google.com/p/go-tour/wc: 无法下载: code.google.com/p/go-tour/wc
goinstall: os/exec: go/build: 无法在本地找到包
goinstall: net/http: go/build: 无法在本地找到包

我知道路径设置有问题..我也查看了这个帖子

export PATH=$PATH:/home/sakthi/sakthig/code/my/go/go/bin
export GOROOT=/home/sakthi/sakthig/code/my/go/go
export GOPATH=$GOROOT/bin

这是我的当前路径设置..有什么帮助吗?

英文:
goinstall go-tour.googlecode.com/hg/gotour

Running the above command give me the following message ..

goinstall: encoding/json: go/build: package could not be found locally
goinstall: code.google.com/p/go-tour/pic: cannot download: code.google.com/p/go-tour/pic
goinstall: code.google.com/p/go-tour/tree: cannot download: code.google.com/p/go-tour/tree
goinstall: code.google.com/p/go-tour/wc: cannot download: code.google.com/p/go-tour/wc
goinstall: os/exec: go/build: package could not be found locally
goinstall: net/http: go/build: package could not be found locally

I know that there is problem with path setting .. i also checked this post

export PATH=$PATH:/home/sakthi/sakthig/code/my/go/go/bin
export GOROOT=/home/sakthi/sakthig/code/my/go/go
export GOPATH=$GOROOT/bin

This is my current path setting.. any help ?

答案1

得分: 3

The Go Tour project has been updated recently.

The Go weekly.2011-11-09 release renamed the json package to encoding/json.

The Go weekly.2011-12-14 release changed the naming for the go-tour package import paths from "go-tour.googlecode.com/hg/tree" to "code.google.com/p/go-tour/tree".

Update to the Go weekly release (Keeping up with releases).

$ cd $GOROOT/src
$ hg pull
$ hg update weekly
$ ./all.bash

Then install the go-tour/tree package.

$ cd $GOROOT
$ goinstall -v -fix code.google.com/p/go-tour/tree
goinstall: open /home/peter/go/goinstall.log: no such file or directory
goinstall: code.google.com/p/go-tour/tree: download
goinstall: cd / && /usr/bin/hg clone https://code.google.com/p/go-tour /home/peter/go/src/pkg/code.google.com/p/go-tour
goinstall: selecting tip
goinstall: cd /home/peter/go/src/pkg/code.google.com/p/go-tour && /usr/bin/hg update
goinstall: code.google.com/p/go-tour/tree: install
goinstall: cd /home/peter/go/src/pkg/code.google.com/p/go-tour/tree && /bin/bash gomake -f- install
$ 
英文:

The Go Tour project has been updated recently.

The Go weekly.2011-11-09 release renamed the json package to encoding/json.

The Go weekly.2011-12-14 release changed the naming for the go-tour package import paths from "go-tour.googlecode.com/hg/tree" to "code.google.com/p/go-tour/tree".

Update to the Go weekly release (Keeping up with releases).

$ cd $GOROOT/src
$ hg pull
$ hg update weekly
$ ./all.bash

Then install the go-tour/tree package.

$ cd $GOROOT
$ goinstall -v -fix code.google.com/p/go-tour/tree
goinstall: open /home/peter/go/goinstall.log: no such file or directory
goinstall: code.google.com/p/go-tour/tree: download
goinstall: cd / && /usr/bin/hg clone https://code.google.com/p/go-tour /home/peter/go/src/pkg/code.google.com/p/go-tour
goinstall: selecting tip
goinstall: cd /home/peter/go/src/pkg/code.google.com/p/go-tour && /usr/bin/hg update
goinstall: code.google.com/p/go-tour/tree: install
goinstall: cd /home/peter/go/src/pkg/code.google.com/p/go-tour/tree && /bin/bash gomake -f- install
$ 

答案2

得分: 2

具体来说,在weekly.2011-12-14中,goinstall被更新为拒绝不符合格式的google路径:"code.google.com/p/go-tour/tree"

这个格式会失败:"go-tour.googlecode.com/hg/tree"

实际发布信息:
http://goo.gl/PeXnO

英文:

Specifically in the weekly.2011-12-14, goinstall was updated to reject google paths that don't follow the format: "code.google.com/p/go-tour/tree"

This format would fail: "go-tour.googlecode.com/hg/tree"

Actual release information:
http://goo.gl/PeXnO

答案3

得分: 1

goinstall go-tour.googlecode.com/hg/gotour
go-tour.googlecode.com/hg/gotour: 下载失败: 不支持的导入路径;
应该是 "code.google.com/p/go-tour/gotour"
使用 -fix 参数运行 goinstall 来修复代码。 ($GOPATH 未设置)
goinstall -dashboard=false code.google.com/p/go-tour/gotour
(cd ~/go && hg id)
82fdc445f2ff weekly/weekly.2011-12-14
$

英文:
$ goinstall go-tour.googlecode.com/hg/gotour
go-tour.googlecode.com/hg/gotour: download failed: unsupported import path;
should be "code.google.com/p/go-tour/gotour"
Run goinstall with -fix to gofix the code. ($GOPATH is not set)
$ goinstall -dashboard=false code.google.com/p/go-tour/gotour
$ (cd ~/go && hg id)
82fdc445f2ff weekly/weekly.2011-12-14
$ 

huangapple
  • 本文由 发表于 2011年12月21日 00:03:40
  • 转载请务必保留本文链接:https://go.coder-hub.com/8578295.html
匿名

发表评论

匿名网友

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

确定