goinstall go-tour.googlecode.com/hg/gotour
运行上面的命令会给我以下消息..
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
我知道路径设置有问题..我也检查了这个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
这是我当前的路径设置..有什么帮助?
答案 0 :(得分:3)
Go Tour project最近已更新。
Go weekly.2011-11-09版本将json
包重命名为encoding/json
。
Go weekly.2011-12-14版本更改了go-tour
包import
路径从"go-tour.googlecode.com/hg/tree"
到"code.google.com/p/go-tour/tree"
的命名。
更新Go周刊(Keeping up with releases)。
$ cd $GOROOT/src
$ hg pull
$ hg update weekly
$ ./all.bash
然后安装go-tour/tree
包。
$ 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
$
答案 1 :(得分:2)
特别是在daily.2011-12-14中,goinstall已更新为拒绝不符合以下格式的google路径:“code.google.com/p/go-tour/tree”
此格式将失败:“go-tour.googlecode.com/hg/tree”
实际发布信息: http://goo.gl/PeXnO
答案 2 :(得分:1)
$ 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
$