LoginSignup
2
1

A Tour of Goエラー:zsh: command not found: gotour

Posted at

概要

A Tour of Goをスタンドアロンで動かそうとした時に出たエラーの解消方法について記載しています。
(所要時間1分)
スクリーンショット 2024-03-02 16.27.01.png

今回起きたエラー

記事に書いてある通りに下のコマンドを実行した時にエラーが出ました

go tool tour

エラー:
スクリーンショット 2024-03-02 16.29.07.png

解決方法

下のコマンドを実行

# install
go install golang.org/x/website/tour@latest
# tourがインストールされているかを確認
ls ~/go/bin
# PATHを設定(.zshrc or .bashrcに以下を追加)
export PATH=$PATH:~/go/bin
# 再読み込み
source ~/.zshrc
# tourを起動
tour

参照:英語版のA Tour of Go
https://go.dev/tour/welcome/3

スタンドアロンの起動イメージ

http://127.0.0.1:3999/welcome/1
で起動しています。

tourofgo_errror.jpg

以上です!!

2
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
2
1