I wanna install node from nvm, but i run into problem ‘nvm needs curl or wget to proceed’
My operating system is debian9,nvm version is v0.35.2
how to fix it?
here is the nvm debug result
zhangyujia.sally@n227-017-236:~$ nvm debug nvm --version: v0.35.2 $SHELL: /bin/bash $SHLVL: 1 ${HOME}: /home/zhangyujia.sally ${NVM_DIR}: '${HOME}/.nvm' ${PATH}: /opt/tiger/toutiao/lib:/opt/tiger/jdk/jdk1.8/bin:/opt/tiger/go/go/bin:/usr/lib64/node-v13.9.0-darwin-x64/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/opt/tiger/ss_bin:/usr/local/jdk/bin:/usr/sbin/:/opt/tiger/ss_lib/bin:/opt/tiger/ss_lib/python_package/lib/python2.7/site-packages/django/bin:/opt/tiger/yarn_deploy/hadoop/bin/:/opt/tiger/yarn_deploy/hive/bin/:/opt/tiger/yarn_deploy/jdk/bin/:/opt/tiger/hadoop_deploy/jython-2.5.2/bin:/opt/tiger/dev_toolkit/bin $PREFIX: '' ${NPM_CONFIG_PREFIX}: '' $NVM_NODEJS_ORG_MIRROR: '' $NVM_IOJS_ORG_MIRROR: '' shell version: 'GNU bash, version 4.4.12(1)-release (x86_64-pc-linux-gnu)' uname -a: 'Linux 4.14.81.bm.15-amd64 #1 SMP Debian 4.14.81.bm.15 Sun Sep 8 05:02:31 UTC 2019 x86_64 GNU/Linux' OS version: Debian GNU/Linux 9 -bash: nvm_has: command not found curl: not found -bash: nvm_has: command not found wget: not found -bash: nvm_has: command not found git: not found -bash: nvm_has: command not found grep: not found -bash: nvm_has: command not found awk: not found -bash: nvm_has: command not found sed: not found -bash: nvm_has: command not found cut: not found -bash: nvm_has: command not found basename: not found -bash: nvm_has: command not found rm: not found -bash: nvm_has: command not found mkdir: not found -bash: nvm_has: command not found xargs: not found nvm current: none which node: which iojs: which npm: npm config get prefix: -bash: npm: command not found npm root -g: -bash: npm: command not found
and the type curl/type wget results
zhangyujia.sally@n227-017-236:~$ type curl curl is hashed (/usr/bin/curl) zhangyujia.sally@n227-017-236:~$ type wget wget is /usr/bin/wget
Advertisement
Answer
put this into bashrc file
export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")" [ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm
then source ~/.bashrc