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 anEDITOR
environment variable. I suspect that this is because you have it set in theSUDO_EDITOR
orVISUAL
environment variables, both of which take precedence overEDITOR
if they're set. Trysudo SUDO_EDITOR="vim" visudo
orsudo SUDO_EDITOR="nano" visudo
instead.If that isn't it, the other possibility is that in your
sudoers
file,env_editor
is disabled and soeditor
is forcing the use of Sublime Text.