Score:0

nvm can't install node

pw flag

I am trying to install a stable version of node, which is now at 16.x. Ubuntu's repositories are at 10.19. I tried to use nvm and had these results:

@nspiron-N5010:~$ nvm install 16.10.0
Downloading and installing node v16.10.0...
Downloading https://nodejs.org/dist/v16.10.0/node-v16.10.0-linux-x64.tar.xz...
Warning: Failed to create the file
Warning: /home/***/.nvm/.cache/bin/node-v16.10.0-linux-x64/node-v16.10.0-linux-
Warning: x64.tar.xz: Permission denied

0.0%curl: (23) Failure writing output to destination

Binary download from https://nodejs.org/dist/v16.10.0/node-v16.10.0-linux-x64.tar.xz failed, trying source.
grep: /home/***/.nvm/.cache/bin/node-v16.10.0-linux-x64/node-v16.10.0-linux-x64.tar.xz: No such file or directory
Provided file to checksum does not exist.
Binary download failed, trying source.
Detected that you have 4 CPU core(s)
Running with 3 threads to speed up the build
Downloading https://nodejs.org/dist/v16.10.0/node-v16.10.0.tar.xz...
Warning: Failed to create the file
Warning: /home/***/.nvm/.cache/src/node-v16.10.0/node-v16.10.0.tar.xz:
Warning: Permission denied

0.0%curl: (23) Failure writing output to destination

Binary download from https://nodejs.org/dist/v16.10.0/node-v16.10.0.tar.xz failed, trying source.
grep: /home/***/.nvm/.cache/src/node-v16.10.0/node-v16.10.0.tar.xz: No such file or directory
Provided file to checksum does not exist.

What I'm doing wrong?

in flag
The message is saying you don't have permission to write to the `/home/***/.nvm/.cache/` directory. Is `***` your directory? If so, have you checked the permissions are still set for _you_ and not another account?
Score:0
pw flag

just in case anyone is wonder: nodejs was updated but needed to reboot ubuntu instead off and on the terminal as tutorial asked. Unrebooted system keep showing old version of node when new was already installed and another go with install process messed up with the ubuntu. So my advice is just to reboot ubuntu not only switch off and on terminal.

Score:0
gs flag

I had the same problem, reboot didn't help.

Easy working solution:

  1. Follow the link in the terminal and download the file https://nodejs.org/dist/v20.3.1/node-v20.3.1-linux-x64.tar.xz

  2. Create the path manually and place the downloaded file there /home/viksua/.nvm/.cache/bin/node-v20.3.1-linux-x64/node-v20.3.1-linux-x64.tar.xz

  3. Reran the command - nvm install node

    my Terminal

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.