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

前端 未结 26 1647
失恋的感觉
失恋的感觉 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:15

    This worked for me:

    echo "myuser ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
    

    where your user is "myuser"

    for a Docker image, that would just be:

    RUN echo "myuser ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
    

提交回复
热议问题