When you try to install a package on Linux, you may face an error like this:
user@linux-debian-gnu:/$ sudo /usr/sbin/visudo
We trust you have received the usual lecture from the local System Administrator.
It usually boils down to these three things:
#1) Respect the privacy of others.
#2) Think before you type.
#3) With great power comes great responsibility.
[sudo] password for user:
User is not in the sudoers file. This incident will be reported.
You need to add your user to sudoers file. In order to do that; login as root and type the following:
echo 'user ALL=(ALL) ALL' >> /etc/sudoers
Note: You must use your own username instead of “user”.