How to fix 'sudo: no tty present and no askpass program specified' error?

前端 未结 26 1654
失恋的感觉
失恋的感觉 2020-11-22 03:36

I am trying to compile some sources using a makefile. In the makefile there is a bunch of commands that need to be ran as sudo.

When I compile the sour

26条回答
  •  别跟我提以往
    2020-11-22 04:22

    I think I can help someone with my case.

    First, I changed the user setting in /etc/sudoers referring to above answer. But It still didn't work.

    myuser   ALL=(ALL) NOPASSWD: ALL
    %mygroup  ALL=(ALL:ALL) ALL
    

    In my case, myuser was in the mygroup.

    And I didn't need groups. So, deleted that line.

    (Shouldn't delete that line like me, just marking the comment.)

    myuser   ALL=(ALL) NOPASSWD: ALL
    

    It works!

提交回复
热议问题