I'm trying to use the 'forever' node.js package to run a node.js service on Ubuntu. Seems like it should be straightforward. However, when I run it, I receive the following output:
/usr/bin/env: node: No such file or directory
I think this may be because the Ubuntu package manager names the node.js binary nodejs
, rather than node
, which is more standard. Is there a way to tell the forever package where to find node?
(I did try symlinking /usr/bin/node
to /usr/bin/nodejs
, but that produced even more errors and it feels like a hack anyway)
Have you tried installing the latest node from source?
git clone https://github.com/joyent/node.git
cd node
git checkout v0.8.22 #Try checking nodejs.org for what the stable version is
./configure
make
sudo make install
This video isn't entirely clear, but the author implies that older versions of node in the Debian repository are behind the node/nodejs naming issue.
Alternatively, you could try finding the target of the /usr/bin/nodejs symlink using any of the methods described here and create a /usr/bin/node symlink to that.
Good luck!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With