2

I'm trying to install node.js on ubuntu 14.10

I do not want to use the ubuntu package but the latest stable version of node - v0.10.36 so I have installed pvm and have installed node v0.10.36

so far so good, when i run

node -v

it correctly gives me the right version.

However if I now close the console I did the install from and open a new console, and run node -v again, I get the infamous conflict message -

The program 'node' can be found in the following packages:
 * node
 * nodejs-legacy
Try: sudo apt-get install <selected package>

If I run nvm install 0.10.36, it tells me it is already installed, but node -v works again

I cannot actually see node in usr\bin

How to I find out where it got installed to and what do I have to do to make node work between console closes?

3 Answers 3

1

You can do it simply by create symbolic link to nodejs:

First check if nodejs exist: ls -l /usr/bin/nodejs

The create symbolic link: sudo ln -s /usr/bin/nodejs /usr/bin/node

1
  • I don't have a nodejs, node was installed by nvm to .nvm/v0.10.26/bin in my home directory. Do I still set a symbolic link or add the directory to my PATH?
    – mfc
    Commented Feb 2, 2015 at 13:08
1

Getting the same error on Ubuntu 14.04 when closing the console.

As seen here, once NVM is installed, you have to create a default to start with the console :

To set a default Node version to be used in any new shell, use the alias 'default':

nvm alias default node

1

There seems to be a problem with node package in Ubuntu... I saved myself a headache by downloading node zip from the official site and extracted the files to their respective postions.... I.e the files in the extracted bin folder to /usr/bin and the rest respectively

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .