Ubuntu安装Node.js

Ubuntu安装Node.js

官网:

python 复制代码
https://nodejs.org/en/download
python 复制代码
# Download and install nvm:
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.4/install.sh | bash

# in lieu of restarting the shell
\. "$HOME/.nvm/nvm.sh"

# Download and install Node.js:
nvm install 24

# Verify the Node.js version:
node -v # Should print "v24.14.0".

# Verify npm version:
npm -v # Should print "11.9.0".

也可以使用Docker方式安装,指令如下:

python 复制代码
# Docker has specific installation instructions for each operating system.
# Please refer to the official documentation at https://docker.com/get-started/

# Pull the Node.js Docker image:
docker pull node:24-alpine

# Create a Node.js container and start a Shell session:
docker run -it --rm --entrypoint sh node:24-alpine

# Verify the Node.js version:
node -v # Should print "v24.14.0".

# Verify npm version:
npm -v # Should print "11.9.0".
相关推荐
wellc2 小时前
如何在Windows系统上安装和配置Node.js及Node版本管理器(nvm)
windows·node.js
我去流水了2 小时前
【独家免费】【亲测】在linux下嵌入式linux的web http服务【Get、Post】,移植mongoose,post上传文件
linux·运维·前端
无籽西瓜a2 小时前
Linux 文件权限与 chmod 详解
linux·服务器·后端
攻城狮在此2 小时前
Rufus使用教程:Windows/Linux 系统启动盘制作
linux·服务器·windows
尽兴-2 小时前
Elasticsearch 8.14.3 安装部署实战:Windows/Linux + Kibana + 常用插件
linux·windows·elasticsearch·kinana·es 浏览器插件
DARLING Zero two♡2 小时前
CentOS 部署 Teemii:打造专属私人漫画阅读库
linux·运维·centos
WHD3062 小时前
苏州服务器维修哪家好/公司推荐
linux·ubuntu·centos·计算机外设·电脑·unix·安全架构
咸鱼梦想家π2 小时前
Linux权限
linux·运维·服务器
Byte不洛2 小时前
基于 C++ 手写 HTTP 服务器:从请求解析到响应构建全流程解析
linux·网络·c++·计算机网络·http