-
Notifications
You must be signed in to change notification settings - Fork 3
NPM Not Found (CentOS)
Joe Wollard edited this page Feb 23, 2014
·
1 revision
When using sudo
or su
in CentOS, you may get an error stating that one of the commands you entered wasn't found even though that command is normally in your $PATH. In CentOS, the sudoers file is a little more locked down than in other OSes. There might be a better way to remedy this issue, but here's one solution:
# change to root (login when prompted)
su
# edit the sudoers file
visudo
# You're now editing the sudoers file in vim. Search for 'secure_path' by typing
/secure_path
# Change that line from
# Defaults secure_path = /sbin:/bin:/usr/sbin:/usr/bin
# to...
Defaults secure_path = /usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin