Debian 11 更新 Node.js 版本
发布于 2023-07-14 在 https://chenhaotian.top/debian/d-upd-nodejs/
步骤
从 NodeSource 服务下载需要的 Node.js 安装脚本。注意更换版本号。当前的 LTS 版本是 18.x
curl -sL https://deb.nodesource.com/setup_18.x | sudo -E bash -
现在可以直接从 apt 安装(更新)noedjs
sudo apt install -y nodejs
查看 node 版本
node -v
过程演示
root@VM-PV30VGNA7611:~# curl -sL https://deb.nodesource.com/setup_18.x | sudo -E bash -## Installing the NodeSource Node.js 18.x repo...## Populating apt-get cache...+ apt-get update
命中:1 http://deb.debian.org/debian buster InRelease
命中:2 http://deb.debian.org/debian buster-updates InRelease
获取:3 http://deb.debian.org/debian buster-backports InRelease [51.4 kB]
命中:4 https://download.docker.com/linux/debian buster InRelease
命中:5 http://security.debian.org/debian-security buster/updates InRelease
已下载 51.4 kB,耗时 1秒 (62.1 kB/s)
正在读取软件包列表... 完成## Confirming "buster" is supported...+ curl -sLf -o /dev/null 'https://deb.nodesource.com/node_18.x/dists/buster/Release'## Adding the NodeSource signing key to your keyring...+ curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | gpg --dearmor | tee /usr/share/keyrings/nodesource.gpg >/dev/null## Creating apt sources list file for the NodeSource Node.js 18.x repo...+ echo 'deb [signed-by=/usr/share/keyrings/nodesource.gpg] https://deb.nodesource.com/node_18.x buster main' > /etc/apt/sources.list.d/nodesource.list
+ echo 'deb-src [signed-by=/usr/share/keyrings/nodesource.gpg] https://deb.nodesource.com/node_18.x buster main' >> /etc/apt/sources.list.d/nodesource.list ## Running `apt-get update` for you...+ apt-get update
命中:1 http://security.debian.org/debian-security buster/updates InRelease
命中:2 http://deb.debian.org/debian buster InRelease
命中:3 http://deb.debian.org/debian buster-updates InRelease
命中:4 http://deb.debian.org/debian buster-backports InRelease
命中:5 https://download.docker.com/linux/debian buster InRelease
获取:6 https://deb.nodesource.com/node_18.x buster InRelease [4,584 B]
获取:7 https://deb.nodesource.com/node_18.x buster/main amd64 Packages [776 B]
已下载 5,360 B,耗时 1秒 (6,592 B/s)
正在读取软件包列表... 完成## Run `sudo apt-get install -y nodejs` to install Node.js 18.x and npm
## You may also need development tools to build native addons:sudo apt-get install gcc g++ make
## To install the Yarn package manager, run:curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | gpg --dearmor | sudo tee /usr/share/keyrings/yarnkey.gpg >/dev/nullecho "deb [signed-by=/usr/share/keyrings/yarnkey.gpg] https://dl.yarnpkg.com/debian stable main" | sudo tee /etc/apt/sources.list.d/yarn.listsudo apt-get update && sudo apt-get install yarnroot@VM-PV30VGNA7611:~# sudo apt install -y nodejs
正在读取软件包列表... 完成
正在分析软件包的依赖关系树
正在读取状态信息... 完成
下列软件包是自动安装的并且现在不需要了:gyp javascript-common libbrotli1 libc-ares2 libjs-inherits libjs-is-typedarray libssl-dev libuv1 libuv1-dev node-abbrev node-ajv node-ansi node-ansi-alignnode-ansi-regex node-ansi-styles node-ansistyles node-aproba node-archy node-are-we-there-yet node-asn1 node-assert-plus node-asynckit node-aws-sign2 node-aws4node-balanced-match node-bcrypt-pbkdf node-bluebird node-boxen node-brace-expansion node-builtin-modules node-builtins node-cacache node-call-limit node-camelcasenode-caseless node-chalk node-chownr node-cli-boxes node-cliui node-clone node-co node-color-convert node-color-name node-combined-stream node-concat-mapnode-concat-stream node-config-chain node-console-control-strings node-copy-concurrently node-core-util-is node-cross-spawn node-cyclist node-dashdashnode-decamelize node-decompress-response node-deep-extend node-defaults node-delayed-stream node-delegates node-detect-indent node-detect-newline node-duplexer3node-duplexify node-ecc-jsbn node-editor node-encoding node-end-of-stream node-errno node-escape-string-regexp node-execa node-extend node-extsprintf node-find-upnode-flush-write-stream node-forever-agent node-form-data node-from2 node-fs-vacuum node-fs-write-stream-atomic node-fs.realpath node-gauge node-get-caller-filenode-get-stream node-getpass node-glob node-got node-graceful-fs node-har-schema node-har-validator node-has-flag node-has-symbol-support-x node-has-to-string-tag-xnode-has-unicode node-hosted-git-info node-http-signature node-iconv-lite node-iferr node-import-lazy node-imurmurhash node-inflight node-inherits node-ininode-invert-kv node-is-builtin-module node-is-npm node-is-object node-is-plain-obj node-is-retry-allowed node-is-stream node-is-typedarray node-isarray node-isexenode-isstream node-isurl node-jsbn node-json-parse-better-errors node-json-schema node-json-stable-stringify node-json-stringify-safe node-jsonify node-jsonparsenode-jsonstream node-jsprim node-latest-version node-lazy-property node-lcid node-libnpx node-locate-path node-lockfile node-lowercase-keys node-lru-cache node-memnode-mime-types node-mimic-fn node-mimic-response node-minimatch node-minimist node-mississippi node-mkdirp node-move-concurrently node-mute-stream node-node-uuidnode-nopt node-normalize-package-data node-npm-package-arg node-npm-run-path node-npmlog node-oauth-sign node-object-assign node-once node-opener node-os-localenode-osenv node-p-cancelable node-p-finally node-p-limit node-p-locate node-p-timeout node-package-json node-parallel-transform node-path-existsnode-path-is-absolute node-path-is-inside node-performance-now node-prepend-http node-process-nextick-args node-promise-inflight node-promzard node-proto-listnode-prr node-pump node-pumpify node-punycode node-qs node-qw node-rc node-read node-read-package-json node-readable-stream node-registry-auth-tokennode-registry-url node-request node-require-directory node-require-main-filename node-resolve-from node-retry node-rimraf node-run-queue node-safe-buffer node-semvernode-semver-diff node-set-blocking node-sha node-shebang-command node-shebang-regex node-signal-exit node-slash node-slide node-sorted-object node-spdx-correctnode-spdx-expression-parse node-spdx-license-ids node-sshpk node-ssri node-stream-each node-stream-iterate node-stream-shift node-string-decoder node-string-widthnode-strip-ansi node-strip-eof node-strip-json-comments node-supports-color node-tar node-term-size node-text-table node-through node-through2 node-timed-outnode-tough-cookie node-tunnel-agent node-tweetnacl node-typedarray node-uid-number node-unique-filename node-unpipe node-url-parse-lax node-url-to-optionsnode-util-deprecate node-uuid node-validate-npm-package-license node-validate-npm-package-name node-verror node-wcwidth.js node-which node-which-modulenode-wide-align node-widest-line node-wrap-ansi node-wrappy node-write-file-atomic node-xdg-basedir node-xtend node-y18n node-yallist node-yargs node-yargs-parserpython-pkg-resources
使用'sudo apt autoremove'来卸载它(它们)。
下列软件包将被【卸载】:libnode-dev libnode64 node-gyp nodejs-doc npm
下列软件包将被升级:nodejs
升级了 1 个软件包,新安装了 0 个软件包,要卸载 5 个软件包,有 5 个软件包未被升级。
需要下载 28.7 MB 的归档。
解压缩后会消耗 146 MB 的额外空间。
获取:1 https://deb.nodesource.com/node_18.x buster/main amd64 nodejs amd64 18.16.1-deb-1nodesource1 [28.7 MB]
已下载 28.7 MB,耗时 1秒 (44.7 MB/s)
apt-listchanges: 读取变更记录(changelogs)...
(正在读取数据库 ... 系统当前共安装有 38371 个文件和目录。)
正在卸载 npm (5.8.0+ds6-4+deb10u2) ...
正在卸载 node-gyp (3.8.0-6) ...
正在卸载 libnode-dev:amd64 (10.24.0~dfsg-1~deb10u3) ...
正在卸载 nodejs-doc (10.24.0~dfsg-1~deb10u3) ...
dpkg: libnode64:amd64:有依赖问题,但是如您所愿,将继续卸载:nodejs 依赖于 libnode64 (= 10.24.0~dfsg-1~deb10u3).正在卸载 libnode64:amd64 (10.24.0~dfsg-1~deb10u3) ...
(正在读取数据库 ... 系统当前共安装有 35778 个文件和目录。)
准备解压 .../nodejs_18.16.1-deb-1nodesource1_amd64.deb ...
正在解压 nodejs (18.16.1-deb-1nodesource1) 并覆盖 (10.24.0~dfsg-1~deb10u3) ...
正在设置 nodejs (18.16.1-deb-1nodesource1) ...
正在处理用于 libc-bin (2.28-10+deb10u2) 的触发器 ...
正在处理用于 man-db (2.8.5-2) 的触发器 ...
root@VM-PV30VGNA7611:~# node -v
v18.16.1
相关文章:
Debian 11 更新 Node.js 版本
发布于 2023-07-14 在 https://chenhaotian.top/debian/d-upd-nodejs/ 步骤 从 NodeSource 服务下载需要的 Node.js 安装脚本。注意更换版本号。当前的 LTS 版本是 18.x curl -sL https://deb.nodesource.com/setup_18.x | sudo -E bash -现在可以直接从 apt 安装࿰…...

python 对图像进行聚类分析
import cv2 import numpy as np from sklearn.cluster import KMeans import time# 中文路径读取 def cv_imread(filePath, cv2_falgcv2.COLOR_BGR2RGB): cv_img cv2.imdecode(np.fromfile(filePath, dtypenp.uint8), cv2_falg) return cv_img# 自定义装饰器计算时间 def…...

程序员导航站
探路者 hello.alluniverse.vip 开发者导航 - Pro Developer网站导航 探路者是一款极简导航工具,致力于收录的每个站点都有其独特的作用。同时支持自定义导航,让用户快速实现个性化的导航站点。 特性概述 免费ChatGPT 装机必备 开发工具 Git精选项目 …...

BIO、NIO、AIO三者的区别及其应用场景(结合生活例子,简单易懂)
再解释三者之前我们需要先了解几个概念: 阻塞、非阻塞:是相较于线程来说的,如果是阻塞则线程无法往下执行,不阻塞,则线程可以继续往下 执行。同步、异步:是相较于IO来说的,同步需要等待IO操作完…...

深度学习YOLO图像视频足球和人体检测 - python opencv 计算机竞赛
文章目录 0 前言1 课题背景2 实现效果3 卷积神经网络4 Yolov5算法5 数据集6 最后 0 前言 🔥 优质竞赛项目系列,今天要分享的是 🚩 深度学习YOLO图像视频足球和人体检测 该项目较为新颖,适合作为竞赛课题方向,学长非…...

系列七、JVM的内存结构【堆(Heap)】
一、概述 一个JVM实例只存在一个堆内存,堆内存的大小是可以手动调节的。类加载器读取了类文件后,需要把类、方法、常变量放到堆内存中,保存所有引用类型的真实信息,以方便执行器执行,堆内存分为三个部分,即…...

什么是Selenium?如何使用Selenium进行自动化测试?
什么是 Selenium? Selenium 是一种开源工具,用于在 Web 浏览器上执行自动化测试(使用任何 Web 浏览器进行 Web 应用程序测试)。 等等,先别激动,让我再次重申一下,Selenium 仅可以测试Web应用…...

【蓝桥杯 第十五届模拟赛 Java B组】训练题(A - I)
目录 A、求全是字母的最小十六进制数 B、Excel表格组合 C、求满足条件的日期 D、 取数字 - 二分 (1)暴力 (2)二分 E、最大连通块 - bfs F、哪一天? G、信号覆盖 - bfs (1)bfs…...

【数据结构】手撕双向链表
目录 前言 1. 双向链表 带头双向循环链表的结构 2. 链表的实现 2.1 初始化 2.2 尾插 2.3 尾删 2.4 头插 2.5 头删 2.6 在pos位置之前插入 2.7 删除pos位置 3.双向链表完整源码 List.h List.c 前言 在上一期中我们介绍了单链表,也做了一些练习题&…...

性能测试 —— Jmeter接口处理不低于200次/秒-场景
需求:期望某个接口系统的处理能力不低于200次/秒,如何设计? ①这个场景是看服务器对某个接口的TPS值是否能大于等于200,就可以了; ②系统处理能力:说的就是我们性能测试中的TPS; ③只要设计一…...
Qt中使用QNetworkAccessManager类发送https请求时状态码返回0
前言 在项目开发中,碰到一个问题,使用QNetworkAccessManager类对象发送https请求时,状态码一直返回0,抓包分析看请求响应也是正常的。费了好大劲终于搞定了,主要是两个原因导致的。 原因一:未设置支持SSL…...
Linux - 物理内存管理 - memmap
说明 裁减内核预留内存占用,在启动log中,发现memmap占用了大块内存(446个pages)。 On node 0 totalpages: 32576 memblock_alloc_try_nid: 1835008 bytes align0x40 nid0 from0x0000000000000000 max_addr0x0000000000000000 al…...

Python爬虫动态ip代理防止被封的方法
目录 前言 一、什么是动态IP代理? 二、如何获取代理IP? 1. 付费代理IP 2. 免费代理IP 3. 自建代理IP池 三、如何使用代理IP爬取数据? 1. 使用requests库设置代理IP 2. 使用urllib库设置代理IP 3. 使用selenium库设置代理IP 四、常…...

01Urllib
1.什么是互联网爬虫? 如果我们把互联网比作一张大的蜘蛛网,那一台计算机上的数据便是蜘蛛网上的一个猎物,而爬虫程序就是一只小蜘蛛,沿着蜘蛛网抓取自己想要的数据 解释1:通过一个程序,根据Url(http://www.…...
python爬取酷我音乐 根据歌名进行爬取
# _*_ coding:utf-8 _*_ # 开发工具:PyCharm # 公众号:小宇教程import urllib.parse from urllib.request import urlopen import json import time import sys import osdef Time_1...

【深度学习】吴恩达课程笔记(五)——超参数调试、batch norm、Softmax 回归
笔记为自我总结整理的学习笔记,若有错误欢迎指出哟~ 【吴恩达课程笔记专栏】 【深度学习】吴恩达课程笔记(一)——深度学习概论、神经网络基础 【深度学习】吴恩达课程笔记(二)——浅层神经网络、深层神经网络 【深度学习】吴恩达课程笔记(三)——参数VS超参数、深度…...

腾讯云轻量级服务器和云服务器什么区别?轻量服务器是干什么用的
随着互联网的迅速发展,服务器成为了许多人必备的工具。然而,面对众多的服务器选择,我们常常会陷入纠结之中。在这篇文章中,我们将探讨轻量服务器和标准云服务器的区别,帮助您选择最适合自己需求的服务器。 腾讯云双十…...

解决:虚拟机远程连接失败
问题 使用FinalShell远程连接虚拟机的时候连接不上 发现 虚拟机用的VMware,Linux发行版是CentOs 7,发现在虚拟机中使用ping www.baidu.com是成功的,但是使用FinalShell远程连接不上虚拟机,本地网络也ping不通虚拟机,…...

SpringBoot项目集成发邮件功能
1:引入依赖2:配置设置3:授权码获取:4:核心代码5:postman模拟验证6:安全注意 1:引入依赖 <dependency><groupId>org.apache.commons</groupId><artifactId>c…...

【Spring篇】使用注解进行开发
🎊专栏【Spring】 🍔喜欢的诗句:更喜岷山千里雪 三军过后尽开颜。 🎆音乐分享【如愿】 🥰欢迎并且感谢大家指出小吉的问题 文章目录 🌺原代码(无注解)🎄加上注解⭐两个注…...

地震勘探——干扰波识别、井中地震时距曲线特点
目录 干扰波识别反射波地震勘探的干扰波 井中地震时距曲线特点 干扰波识别 有效波:可以用来解决所提出的地质任务的波;干扰波:所有妨碍辨认、追踪有效波的其他波。 地震勘探中,有效波和干扰波是相对的。例如,在反射波…...

(二)TensorRT-LLM | 模型导出(v0.20.0rc3)
0. 概述 上一节 对安装和使用有个基本介绍。根据这个 issue 的描述,后续 TensorRT-LLM 团队可能更专注于更新和维护 pytorch backend。但 tensorrt backend 作为先前一直开发的工作,其中包含了大量可以学习的地方。本文主要看看它导出模型的部分&#x…...

屋顶变身“发电站” ,中天合创屋面分布式光伏发电项目顺利并网!
5月28日,中天合创屋面分布式光伏发电项目顺利并网发电,该项目位于内蒙古自治区鄂尔多斯市乌审旗,项目利用中天合创聚乙烯、聚丙烯仓库屋面作为场地建设光伏电站,总装机容量为9.96MWp。 项目投运后,每年可节约标煤3670…...

BCS 2025|百度副总裁陈洋:智能体在安全领域的应用实践
6月5日,2025全球数字经济大会数字安全主论坛暨北京网络安全大会在国家会议中心隆重开幕。百度副总裁陈洋受邀出席,并作《智能体在安全领域的应用实践》主题演讲,分享了在智能体在安全领域的突破性实践。他指出,百度通过将安全能力…...
3403. 从盒子中找出字典序最大的字符串 I
3403. 从盒子中找出字典序最大的字符串 I 题目链接:3403. 从盒子中找出字典序最大的字符串 I 代码如下: class Solution { public:string answerString(string word, int numFriends) {if (numFriends 1) {return word;}string res;for (int i 0;i &…...

均衡后的SNRSINR
本文主要摘自参考文献中的前两篇,相关文献中经常会出现MIMO检测后的SINR不过一直没有找到相关数学推到过程,其中文献[1]中给出了相关原理在此仅做记录。 1. 系统模型 复信道模型 n t n_t nt 根发送天线, n r n_r nr 根接收天线的 MIMO 系…...

HarmonyOS运动开发:如何用mpchart绘制运动配速图表
##鸿蒙核心技术##运动开发##Sensor Service Kit(传感器服务)# 前言 在运动类应用中,运动数据的可视化是提升用户体验的重要环节。通过直观的图表展示运动过程中的关键数据,如配速、距离、卡路里消耗等,用户可以更清晰…...
【Android】Android 开发 ADB 常用指令
查看当前连接的设备 adb devices 连接设备 adb connect 设备IP 断开已连接的设备 adb disconnect 设备IP 安装应用 adb install 安装包的路径 卸载应用 adb uninstall 应用包名 查看已安装的应用包名 adb shell pm list packages 查看已安装的第三方应用包名 adb shell pm list…...
【SpringBoot自动化部署】
SpringBoot自动化部署方法 使用Jenkins进行持续集成与部署 Jenkins是最常用的自动化部署工具之一,能够实现代码拉取、构建、测试和部署的全流程自动化。 配置Jenkins任务时,需要添加Git仓库地址和凭证,设置构建触发器(如GitHub…...
用鸿蒙HarmonyOS5实现中国象棋小游戏的过程
下面是一个基于鸿蒙OS (HarmonyOS) 的中国象棋小游戏的实现代码。这个实现使用Java语言和鸿蒙的Ability框架。 1. 项目结构 /src/main/java/com/example/chinesechess/├── MainAbilitySlice.java // 主界面逻辑├── ChessView.java // 游戏视图和逻辑├──…...