I tried to install Node LTS on WSL using NVM.
While I successfully installed nvm, Node installation using nvm install --lts
made some errors:
mv: cannot move '/home/anesin1109/.nvm/.cache/bin/node-v10.15.3-linux-x64/files/bin' to '/home/anesin1109/.nvm/versions/node/v10.15.3/bin': Permission denied
mv: cannot move '/home/anesin1109/.nvm/.cache/bin/node-v10.15.3-linux-x64/files/include' to '/home/anesin1109/.nvm/versions/node/v10.15.3/include': Permission denied
mv: cannot move '/home/anesin1109/.nvm/.cache/bin/node-v10.15.3-linux-x64/files/lib' to '/home/anesin1109/.nvm/versions/node/v10.15.3/lib': Permission denied
mv: cannot move '/home/anesin1109/.nvm/.cache/bin/node-v10.15.3-linux-x64/files/share' to '/home/anesin1109/.nvm/versions/node/v10.15.3/share': Permission denied
I tried to move these files manually, but it also ended with those errors.
Try making sure nothing is accessing the directory. I had this exact issue. I figured out that my VisualStudio Code had the directory open in the WSL which prevented NVM from doing its thing. After closing VS Code nvm install 12
worked fine. Hope that helps.
Please check if your user owns all files in .nvm
. You can take ownership recursively with chown -R <user> .nvm
. Delete all node versions recursively with rm -rf .nvm/versions/node
. Then try again; this process worked for me at least.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With