0

When I am trying to install nodejs I am getting following message

apt-get install nodejs

Reading package lists... Done Building dependency tree
Reading state information... Done The following NEW packages will be installed: nodejs 0 upgraded, 1 newly installed, 0 to remove and 1 not upgraded. Need to get 0 B/5,701 kB of archives. After this operation, 17.3 MB of additional disk space will be used. Selecting previously unselected package nodejs. (Reading database ... 503726 files and directories currently installed.) Unpacking nodejs (from .../nodejs_0.10.29-1chl1~saucy1_amd64.deb) ... Processing triggers for man-db ... Setting up nodejs (0.10.29-1chl1~saucy1) ...

and when I run node -v it say node note present at

bash: /home/<username>/local/bin/node: No such file or directory
1
  • As Robert Rossmann said, on Ubuntu the executable is named nodejs. What's the output of the commands: which nodejs and type nodejs ? Commented Jan 14, 2015 at 10:29

2 Answers 2

2

The interpreter for Ubuntu is called nodejs, not just node.

See the list of files contained in this package.

This is due to a conflict with a historically older (I think) package, Amateur Packet Radio Node program, which includes the node executable.

If you would like to use the node executable, and you do not need the conflicting package to be installed, simply create a symlink anywhere appropriate, i.e. in /usr/local/bin:

[sudo] ln -s /usr/bin/nodejs /usr/local/bin/node
Sign up to request clarification or add additional context in comments.

Comments

0

I recommend using NVM especially on Ubuntu due to the naming kafuffle as mentioned by @robert rossman

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.