features
features copied to clipboard
Cannot use golang with sudo
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.