Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does not install node on Linux via ssh #682

Closed
ghost opened this issue Mar 3, 2015 · 16 comments
Closed

Does not install node on Linux via ssh #682

ghost opened this issue Mar 3, 2015 · 16 comments

Comments

@ghost
Copy link

ghost commented Mar 3, 2015

I sshed to an Ubuntu machine, curled the install.sh script, installed. nvm install v0.12.0 and after being prompted with Now using node v0.11.0 I tried running node to get in the REPL.

Then:

-bash: /home/prime/.nvm/v0.11.0/bin/node: No such file or directory

The binary node is sitting there, but above is what is happening.

Oh, how unfortunate. I checked my .bashrc and also noticed nothing was written to it.

😞

@ljharb
Copy link
Member

ljharb commented Mar 3, 2015

(I assume the v0.12.0 and v0.11.0 is a typo, and in fact all the version numbers agree)

There's a known issue with Ubuntu in this regard - #394 should have instructions for you.

@ljharb ljharb closed this as completed Mar 3, 2015
@ghost
Copy link
Author

ghost commented Mar 3, 2015

Typo. Will look at that. Thanks.

@ghost
Copy link
Author

ghost commented Mar 3, 2015

BTW, do I need node already installed globally once in order to use nvm? I never ran into any problems before on OS X, but at the time I started using nvm I had already node installed, so I am not sure, hence the question.

@ljharb
Copy link
Member

ljharb commented Mar 3, 2015

No, definitely not :-) You only need curl or wget, and git is also recommended but not required.

@ghost
Copy link
Author

ghost commented Mar 3, 2015

Also, build-essential, and the other package.

@ljharb
Copy link
Member

ljharb commented Mar 3, 2015

Um - build-essential is not required whatsoever, and I have no idea what that is.

@ghost
Copy link
Author

ghost commented Mar 3, 2015

It's the first thing that is written in the installation instructions.

First you'll need to make sure your system has a c++ compiler. For OSX, XCode will work, for Ubuntu, the build-essential and libssl-dev packages work.

So, basically it's just making sure that there is a C++ compiler when we building from source. 👍

@ljharb
Copy link
Member

ljharb commented Mar 3, 2015

lol ah. yes, you do need a compiler if you want to install from source - that's not required however to install a binary.

@ghost
Copy link
Author

ghost commented Mar 3, 2015

The problem here is that nvm does download a binary and installs it to $HOME/.npm/{node.version}/bin/node, and I can definitely see that there is a file of generous size there, but when I try running it, it says -bash: /home/$USER/.nvm/v0.11.0/bin/node: No such file or directory

BTW, does nvm mutates $PATH based in the selected version, or does it work like rbenv with like shims, capturing node calls.

@ljharb
Copy link
Member

ljharb commented Mar 3, 2015

It works more like python's virtualenv; modifying the PATH for that shell only. Every new shell needs nvm use X - or else you can do nvm alias default X to make one of them used by default (assuming the correct line is in your bashrc/bash_profile/etc)

@ghost ghost mentioned this issue Mar 4, 2015
@ghost
Copy link
Author

ghost commented Mar 4, 2015

Same problem again, in a different Ubuntu machine. Is there any chance the binary that nvm downloads is not one compatible with Ubuntu?

#655 ?

@ljharb
Copy link
Member

ljharb commented Mar 4, 2015

That is possible - that'd be the binary that node or io.js releases - nvm just downloads it from their site. It should definitely work building from source though, once you have a compiler available.

@ghost
Copy link
Author

ghost commented Mar 4, 2015

I wonder if fiddling with $NVM_NODEJS_ORG_MIRROR could lead me somewhere...

What is the procedure to build from source with nvm. What do I have to do with $NVM_SOURCE?

@ljharb
Copy link
Member

ljharb commented Mar 4, 2015

You shouldn't have to modify any $NVM_* variables. Just nvm install -s node for example should do it.

@ghost
Copy link
Author

ghost commented Mar 4, 2015

Confirming that installing from source does work on Ubuntu. 👍

@ljharb
Copy link
Member

ljharb commented Mar 4, 2015

Glad to hear it :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant