通过运行visudo ,找到Defaults requiretty,并注释掉,即可解决。 转载于:https://www.cnblogs.com/qianggezhishen/p/7349300.html