devcontainers / devcontainers/features
Cannot use golang with sudo
オープン
- 主要言語
- Shell
- スター
- 1.5k
- フォーク
- 621
- 平均マージ
- 6日 53分
- マージ済み PR(30日)
- 9
説明
When I run golang with sudo like the following, the execution fails.
```
$ sudo go run main.go
sudo: go: command not found
```
It seems the reason is that go binary is installed under `/usr/local`, which sudo(uid 0) cannot access.
コントリビューションガイド
調査の方向性
`sudo go run main.go` で失敗を再現し、その後、Go 機能が `/usr/local` 配下にバイナリをインストールする方法と、sudo がコマンドパスを解決する方法を調査します。文書化されたコマンドで、報告されている `command not found` エラーが発生せず、sudo 経由で Go を見つけて実行できれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- go
- 領域
- devops
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 35/100