2

I need to install pymol on Ubuntu 20.04 and when I am using sudo apt-get install -y pymol it gives an error:

username isn't in the sudoers file. This incident will be reported.

Does anyone know how to solve this problem?

Lorenz Keel
  • 8,362
  • 8
  • 36
  • 49
Misbah naseem
  • 21
  • 1
  • 4
  • 2
    The *unstated* user you are using is either (a) not in the sudoers file thus the error message, or (b) is contained in that file after an error in the file; as any errors in the file are treated as *end-of-file* thus later lines get ignored, thus why it has a special command to edit entries in it; a command that checks for errors preventing end-of-file preventing valid lines from being ignored. – guiverc Jun 02 '22 at 07:33
  • 2
    [a suggested reference](https://www.tecmint.com/fix-user-is-not-in-the-sudoers-file-the-incident-will-be-reported-ubuntu/) – graham Jun 02 '22 at 07:33
  • Did you type "Sudo" luke you typed it in your question? – vanadium Jun 02 '22 at 07:47
  • No, I've written in small letters – Misbah naseem Jun 02 '22 at 08:18
  • 1
    Does this answer your question? [How do I add myself back as a sudo user?](https://askubuntu.com/questions/70442/how-do-i-add-myself-back-as-a-sudo-user) – karel Jun 02 '22 at 09:32

1 Answers1

1

It seems like that the user you are using cannot use sudo because the user is not in the sudoers-file (/etc/sudoers on some systems). So you should have another user who is in that file. It should be the one you created when you installed ubuntu. It is possible that your sudoers-file is corrupted, then nobody is allowed to use sudo. This can happen if you don't open the sudoers-file with visudo (which is the only program you should use). If your sudoers-file is corrupted you should do a backup and maybe reinstall ubuntu.

Luca R
  • 11
  • 2