LoginSignup
0
1

More than 5 years have passed since last update.

vgo requires Go 1.10 but VGOROOT is not a Go 1.10 source tree

Last updated at Posted at 2018-07-01

環境

Go 1.10.3

エラー

vgoを使おうとすると
vgo requires Go 1.10 but VGOROOT is not a Go 1.10 source tree
と表示される

原因

vgoはGoのバージョンが1.10かどうかを
$GOROOT/api/go1.10.txt
が存在するかで判断する

go1.10.txt
パッケージには含まれないので (ソースからインストールすれば手に入る)
パッケージマネージャーを使ってGoをインストールした場合
vgoはファイルを見つけられずに
エラーになる

解決策

2通りある

  • Goをソースからインストールする
  • $GOROOT/api/go1.10.txtを作る

私は後者で解決しました
sudo touch $GOROOT/api/go1.10.txt

vgoはファイルが存在するかではなく
go versionの結果でGoのバージョンを判断するべきですね〜

参考

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1