Ubuntu has two packages with similar names, node and nodejs.
node does this
Description-ru: amateur packet radio node program. The node program accepts TCP / IP and packet radio network connections and provides users with an interface that allows them to establish gateway connections to remote nodes using various amateur radio protocols.
nodejs does this
Description-ru: Node.js server-side javascript engine Node.js is similar in design and depends on systems like Ruby Event Machine or Python Twisted. It takes the event model a little further - it presents the event loop as a language construct, and not as a library. Node.js comes with several useful libraries for working with server tasks: System, Events, Standard I / O, Modules, Timers, Child Processes, POSIX, HTTP, Multipart Parsing, TCP, DNS, Assert, Path, URL, Query Strings.
Fedora also follows a similar package naming scheme. Because of this, the binary in nodejs had to be renamed to nodejs from the original node . However, this is not technically kosher: and most nodejs programs (and libraries installed with npm) assume that the binary node is node . If you want to get around this, the easiest way is simply to symbolically combine the two. If you take this route, do not install the node package, which handles the material of the amateur radio package.
sudo ln -s /usr/bin/nodejs /usr/local/bin/node
Alternatively, in the case of node, I would suggest using n and not installing node . Just install npm (which will install node), then uninstall npm and then tell apt to clear it. To do this, simply run
sudo apt-get install npm sudo npm install -gn sudo n latest sudo apt-get --purge remove npm sudo apt-get autoremove
There are other binary distribution managers that even work from a shell script like nvm , but I personally prefer n . Think of n as an approach to only one thing: the binary binary node, which it installs in /usr/local/bin .
Why remove npm? Were not. apt-get --purge remove can only remove things that are installed by the package manager. n latest works outside the package manager. If you do this, there will be two npms,
- installed by the distribution (Debian / Ubuntu) using
apt-get . - version installed n
n latest .
It makes no sense to have an older version of the distribution. And, even worse, if this version works, it could potentially install it elsewhere and have Debian changes in it that would install the Debian installation directories. It is better to use either / or not both.