sudo: Sorry, you must have a tty to run sudo Error on a Linux and Unix 通过运行visudo ,找到Defaults requiretty,并注释掉,即可解决。