0

I have previously only compiled NodeJS from source, but I am using the default apt repo because of an ease of updating. But I do not understand what is happening.

I install as such: sudo apt-get install nodejs But this only installs the binary "nodejs", not "node" as I am expecting.

Any advice on how to install the binary "node" from the repo? Thanks!

  • install `nodejs-legacy` – hobbs May 22 '14 at 19:16
  • This is documented in the wiki: [Installing Node.js via package manager: Ubuntu, Mint, elementary OS](https://github.com/joyent/node/wiki/Installing-Node.js-via-package-manager#ubuntu-mint-elementary-os). Ubuntu already has a `node` application, Amateur Packet Radio Node Program. So, to avoid conflicts, Node.js simply renamed the binary to `nodejs` for Ubuntu. – Jonathan Lonowski May 22 '14 at 19:16
  • This question appears to be off-topic because it is about Ubuntu – hobbs May 22 '14 at 19:16
  • I've used this instructions: https://gist.github.com/isaacs/579814. Worked pretty well for me. – Rodrigo Medeiros May 22 '14 at 19:27
  • using nodejs-legacy allows me to use the "node" command, but the most recent version is v0.10.15. I am looking for the latest (v0.10.28). Can anyone point me in the right direction? – JackPalkens May 22 '14 at 20:40

1 Answers1

1

You've done the right thing, nodejs is the binary you'll want. In recent versions they've symlinked node to nodejs:

$ ls -al /usr/bin/node
lrwxrwxrwx 1 root root 22 Jan 13 22:51 /usr/bin/node -> /etc/alternatives/node
$ ls -al /etc/alternatives/node 
lrwxrwxrwx 1 root root 15 Feb 28 17:12 /etc/alternatives/node -> /usr/bin/nodejs
$ ls -al /usr/bin/nodejs
-rwxr-xr-x 1 root root 8417896 Feb 19 17:51 /usr/bin/nodejs

You've probably already found this, but these are the instructions that I've used (successfully): https://github.com/joyent/node/wiki/Installing-Node.js-via-package-manager#ubuntu-mint-elementary-os

To verify the version of node:

$ node --version
v0.10.28
dylants
  • 22,316
  • 3
  • 26
  • 22