Skip to content
Advertisement

Node.js bash: /usr/local/bin/node: Permission denied

I’m installing Node.js on Ubuntu machine. I followed official instructions:

./configure && make && sudo make install

So, I got node binary in /usr/local/bin/node and all dependencies. But when I run it from command line I get permission error:

> node
bash: /usr/local/bin/node: Permission denied

How can I fix it? How can I run it under my account? sudo node doesn’t work too.

Advertisement

Answer

You need read- and executable permissions for others. Issue:

sudo chmod +rx $(which node)

or

sudo chmod 755 $(which node)

However, normally make install should set that permissions. Looks like something in the Makefile is wrong.

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement