nvm需要curl或wget才能继续

问题描述 投票:0回答:1

我想从nvm安装节点,但是遇到了'nvm需要curl或wget才能继续的问题'

我的操作系统是debian9,nvm版本是v0.35.2

如何解决?

这是nvm调试结果

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

和类型curl / type wget结果

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
node.js linux debian nvm
1个回答
0
投票

将其放入bashrc文件中

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

然后来源〜/ .bashrc

© www.soinside.com 2019 - 2024. All rights reserved.