bash:npm:在Debian 9.3中找不到命令 [英] bash: npm: command not found in Debian 9.3
问题描述
我正在使用Debian 9.3。 (拉伸)我无法运行 npm命令。
I am using Debian 9.3. (stretch) I cannot run "npm" commands.
node -v
bash: node: command not found
nodejs -v
Output for nodejs -v
v4.8.2
npm -v
bash: npm: command not found
我是Debian的新手,我不知道发生了什么。
-我已经重新安装了Node.js
-我已经尝试按照以下步骤进行操作官方页面。
-我已经运行 apt-get install npm
输出 E:无法找到软件包npm
。
-我当时在Debian Testing中,当我在那里时遇到相同的错误。
I'm a newbie on Debian and I can't understand what's happening.
- I already reinstall Node.js
- I already tried following the steps of the Official Page.
- I already ran apt-get install npm
Output E: Unable to locate package npm
.
- I was at Debian Testing and have the same error when I was there.
感谢您的阅读和帮助
-融化
Thanks for read and help
- Melt
推荐答案
您是否从他们的网站上安装了节点js?如果不是这种情况,请删除它 apt-get删除nodejs
并从此链接安装(按照此步骤)
https://nodejs.org/en/download/package-manager/ #debian-and-ubuntu-based-linux-distributions
Did you installed node js from their website? if that's not the case remove it apt-get remove nodejs
and install it from this link (follow this steps)
https://nodejs.org/en/download/package-manager/#debian-and-ubuntu-based-linux-distributions
选择您的版本后,我意识到您正在运行旧版本的nodejs ...请删除当前的nodejs版本(V4.8.2)并通过此链接安装 https://nodejs.org/en/download/package-manager/#基于debian-and-ubuntu的Linux发行版
它将为您提供安装了NPM的最新版本(我的版本是V9.2.0)。
After seing your version i realized that you are running an older version of nodejs... please remove the current nodejs version (V4.8.2) and install it via this link https://nodejs.org/en/download/package-manager/#debian-and-ubuntu-based-linux-distributions It will give you the last version (mine is V9.2.0) with NPM installed aswell.
这篇关于bash:npm:在Debian 9.3中找不到命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!