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

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

    If by any chance you came here because you can't sudo inside the Ubuntu that comes with Windows10

    1. Edit the /etc/hosts file from Windows (with Notepad), it'll be located at: %localappdata\lxss\rootfs\etc, add 127.0.0.1 WINDOWS8, this will get rid of the first error that it can't find the host.

    2. To get rid of the no tty present error, always do sudo -S

提交回复
热议问题