报错:

sudo:sorry, you must have a tty to run sudo.

visudo -f  /etc/sudoers

注释掉: Defaults requiretty。