0

I installed Node.js via the precompiled package but I can't access it correctly via the Terminal.

> node 

does not work instead I have to type:

> sudo /usr/local/bin/node 

My $PATH reads:

/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/usr/texbin 

What do I need to configure?

I am running OSX 10.10 (14A299l) (XCode6 Beta 4 is installed)

2
  • 1
    Just make sure that /usr/local/bin is in your $PATH. You probably want to set this in your ~/bashrc file, e.g. just add "/usr/local/bin:$PATH" Commented Aug 19, 2014 at 14:11
  • as you can see in my Question /usr/local/bin is already in my $PATH Commented Aug 19, 2014 at 16:46

1 Answer 1

1

If you compiled this package as root it is likely that the file structure all has root ownership. What do you see when you type,

 ls -l /usr/local/bin/ 

If the node.js folder says something like root:root before it then you need to change the permissions via

chmod -R user:user /usr/local/bin/node.... 
Sign up to request clarification or add additional context in comments.

1 Comment

Yosemite apparently defaults to 'No access' for everyone for the folder /usr/local/bin.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.