跟据报错判断,ubuntu没有sudo权限,经过查询需要将ubuntu账户加入/etc/sudoers中
su 输入密码
vim /etc/sudoers
# User privilege specification root ALL=(ALL:ALL) ALL ubuntu ALL=(ALL:ALL) ALL