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".
相关推荐
GanGanGanGan_18 小时前
RustDesk 安装指南 — Rocky Linux 9 + XFCE X11
linux·运维·centos
南境十里·墨染春水1 天前
linux学习笔记 网络编程——Socket入门与TCP客户端/服务器实现
linux·服务器·网络
Yupureki1 天前
《Linux网络编程》6.UDP原理
linux·运维·服务器·网络·udp
楼田莉子1 天前
Linux网络:NAT_代理
linux·运维·服务器·开发语言·c++·后端
烛衔溟1 天前
TypeScript 索引签名、只读数组与 keyof / typeof 入门
linux·ubuntu·typescript
笨笨饿1 天前
#79_NOP()嵌入式C语言中内联汇编宏的抽象封装模式研究
linux·c语言·网络·驱动开发·算法·硬件工程·个人开发
fish_xk1 天前
Linux的权限
linux·运维·服务器
嵌入式×边缘AI:打怪升级日志1 天前
Linux 驱动与应用开发核心自测题库(面试官问答完整版)
linux·运维·php
薛定谔的悦1 天前
储能充放电状态机执行逻辑详解
linux·数据库·能源·储能·bms
嵌入式×边缘AI:打怪升级日志1 天前
Tina SDK Linux Kernel 基本使用(实战篇:为7寸RGB LCD触摸屏添加驱动支持).md
linux·运维·服务器