3
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

私はパス設定に問題があることを知っています..私もこの投稿をチェックしました

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

これは私の現在のパス設定です。

4

3 に答える 3

3

Go Tour プロジェクトが最近更新されました。

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 ウィークリー リリースへの更新 (リリースに追いつく)。

$ 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
$ 
于 2011-12-20T21:31:57.013 に答える
2

特にweekly.2011-12-14で、goinstallが更新され、「code.google.com/p/go-tour/tree」の形式に従わないGoogleパスが拒否されるようになりました。

この形式は失敗します: "go-tour.googlecode.com/hg/tree"

実際のリリース情報:http: //goo.gl/PeXnO

于 2011-12-20T17:31:38.220 に答える
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
$ 
于 2011-12-20T16:27:56.497 に答える