nvm: nvm install node not working on "ubuntu on windows"
So, I’m testing the new native bash on windows made by Canonical, since ubuntu doesn’t have the most recent version of node and npm, I thought of instaling them using nvm.
I’ve created a user for me, since the bash leaves you with the root user. Then, I changed to my user and installed nvm without a problem in my /home/filipe/.nvm folder
.
The problem happens when I try to run nvm install node
. This is the output:
Downloading https://nodejs.org/dist/v5.10.1/node-v5.10.1-linux-x64.tar.xz…
################################################################## 100.0%
tar: bin/npm: Cannot create symlink to ‘…/lib/node_modules/npm/bin/npm-cli.js’: Invalid argument tar: Exiting with failure status due to previous errors Binary download failed, trying source.
################################################################## 100.0%
Checksums empty tar: bin/npm: Cannot create symlink to ‘…/lib/node_modules/npm/bin/npm-cli.js’: Invalid argument tar: Exiting with failure status due to previous errors Binary download failed, trying source. Installing node v1.0 and greater from source is not currently supported
I thought twice before openning this issue, since the environment that I’m using is kind of a total non standard. But since your project is aimed to simplify working with node and npm in various environments, I decided to open it.
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Reactions: 8
- Comments: 31 (9 by maintainers)
Worked for me by using # curl instead of ### wget .
curl https://raw.githubusercontent.com/creationix/nvm/v0.33.2/install.sh | bash
nvm
works fine for me on “Bash on Ubuntu on Windows”. I have latest version of Windows 10. I successfully installed nodelatest
andlts
and I can switch between them and both work fine.Hey everyone… just so you’re all aware, this isn’t an nvm issue, nor a Ubuntu issue, nor a “Windows” issue… it’s a Linux Subsystem for Windows issue.
The current insider build is not capable of creating symlinks… at all. I went through a lot of pain to find th is out, but the short of the story, is that symlinking will probably not ever be available at
/mnt/c/Users
on this subsytem.I created a new user, which added everything to the
/
root filesystem, but at the moment, that doesn’t work either. According to the main developer on the Linux Subsystem for Windows project, this should work, but it’s appparently bugged at the moment.Yep it failed
root@localhost:~# tar xf node-v5.10.1-linux-x64.tar.xz
tar: node-v5.10.1-linux-x64/bin/npm: Cannot create symlink to ‘../lib/node_modules/npm/bin/npm-cli.js’: Invalid argument
tar: Exiting with failure status due to previous errors
The weird thing is that
ln -s
works just fine. Someone already reported this to Microsoft https://github.com/microsoft/bashonwindows/issues/9got it to work… followed this link https://www.liquidweb.com/kb/how-to-install-nvm-node-version-manager-for-node-js-on-ubuntu-12-04-lts/
Thank you for opening the issue and thanks for being open to integrate changes to support bash on Windows. I hope this will make Windows a good platform for Node developers again.
Good call, closing.
Please file separate issues if you have any problems on BashOnWindows!
@ljharb Indeed, But anyway, the nodesource version is also useless: Anything you install fails to work and even npm stops working if you do
npm -g update
Seems like we will have to wait a little longer 😃
@cascalheira Installing node from the nodesource repo works for me. The one downloaded by
nvm
from https://nodejs.org/dist/ gives me thatUnknown system error -25
error. Dunno what the difference is between the two binaries, but it does seem like a bash for windows issue.@filipeaguiar that looks like a node problem (Same thing happened to me), and it also happens if you install node using apt-get.
So i can just assume that nvm is working properly and that its just a node problem,
Edit: When i wrote “node problem” i should have written “Windows LXss problem” as node works as intended on Ubuntu