0
1

More than 1 year has passed since last update.

【Mac】Goをインストール → Goのプラグインをvscodeでインストール → エラー → 2つの原因と解決方法

Posted at

Udemyで勉強しようと思ったら引っかかったのでメモ。

エラー発生までにやったこと

上記の「go公式」で

Apple macOS (x86-64)
macOS 10.13 or later, Intel 64-bit processor
go1.20.3.darwin-amd64.pkg

をインストール

# インストールされているか確認
go version

OK

1.VScodeでGo言語の拡張機能をインストール
→ エラー

2.VSCodeでコマンドパレットを開いてGO: Install/Update tools
→ エラー

ということが発生。

原因

1.Go言語の拡張機能をインストール
→ エラー → xcodeがインストールされていない

2.VSCodeでコマンドパレットを開いてGO: Install/Update tools
→ エラー → MacOSをVenturaに上げたため、XCodeのxcrunコマンドに参照問題が生じてる

解決方法

単純にxcodeをインストールして、xcode-select --installを実行で解決しました。

「xcode」をインストール

Xcodeをインストールします。

xcode-select --installを実行

ターミナルでxcode-select --installを実行します。

エラーが出たところをもう一度やってみる

vscodeで...

1.Go言語の拡張機能をインストール
→ OK!!

2.VSCodeでコマンドパレットを開いてGO: Install/Update tools
→ OK!!

ヨシ!

これから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