debian linux安装nodejs

打开官网https://nodejs.org/en/download/package-manager
按官网说明使用包管理器方式安装

# installs nvm (Node Version Manager)
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
# download and install Node.js
nvm install 20
# verifies the right Node.js version is in the environment
node -v # should print `v20.13.1`
# verifies the right NPM version is in the environment
npm -v # should print `10.5.2`

我使用的是nvm方式,你也可以用其他的
我之前是centos7,安装报错了


image.png

如何解决这个问题,本文没有兴趣,楼主果断升级系统。


image.png
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容