I was trying to install yabai on my Big Sur mac, and ran into an issue when trying to do visudo. After some playing around, I found that I was running into issues even with just sudo visudo
(i.e., the problem isn't with yabai):
❯ sudo visudo
Timeout waiting for detached instance to start: No such file or directory
visudo: /etc/sudoers.tmp unchanged
Nor does adding an editor flag work:
❯ sudo EDITOR="vim" visudo
Timeout waiting for detached instance to start: No such file or directory
visudo: /etc/sudoers.tmp unchanged
❯ sudo EDITOR="nano" visudo
Timeout waiting for detached instance to start: No such file or directory
visudo: /etc/sudoers.tmp unchanged
I'm using zsh.
Would any of you happen to know how to get around this?
Thanks very much in advance!
It looks like visudo
is trying to run Sublime Text despite your use of an EDITOR
environment variable. I suspect that this is because you have it set in the SUDO_EDITOR
or VISUAL
environment variables, both of which take precedence over EDITOR
if they're set. Try sudo SUDO_EDITOR="vim" visudo
or sudo SUDO_EDITOR="nano" visudo
instead.
If that isn't it, the other possibility is that in your sudoers
file, env_editor
is disabled and so editor
is forcing the use of Sublime Text.