I found another question with the same title, however, I suppose my case is a little different.
In an attempt to set up a new project, I needed to install nodejs. I realized that it only worked when used with sudo. E.g. sudo npm
In addition, I visited the link https://docs.npmjs.com/getting-started/fixing-npm-permissions and executed
sudo chown -R $(whoami) $(npm config get prefix)/{lib/node_modules,bin,share}
to change the default directory permissions. Now, because I also had npm here, I ran
sudo chown -R $(whoami) $(sudo npm config get prefix)/{lib/node_modules,bin,share}
Send this, whenever I try to use sudo, I get this error -
sudo: effective uid is not 0, is sudo installed setuid root?
I understand that my setup for npm should be better without root, but I'm a Linux beginner.
Any help would be greatly appreciated. :)
Additional Information -
ls -l $(which sudo) gives => ---s--x--x. 1 dev root 123832 Aug 13 2015 /usr/bin/sudo ---s--x--x. 1 dev root 123832 Aug 13 2015 /usr/bin/sudo
source share