Error while installing nodejs 18 on linux

huangapple go评论70阅读模式
英文:

Error while installing nodejs 18 on linux

问题

在尝试在Linux上安装Node.js时,我遇到了以下错误:

0 已升级,1 新安装,0 要卸载,3 未升级。
需要获取0 B/28.7 MB 的存档。
完成此操作后,将使用额外的 187 MB 磁盘空间。
(正在读取数据库...当前已安装 378127 个文件和目录。)
准备解包.../nodejs_18.16.1-deb-1nodesource1_amd64.deb...
正在解包 nodejs (18.16.1-deb-1nodesource1) ...
dpkg:处理存档 /var/cache/apt/archives/nodejs_18.16.1-deb-1nodesource1_amd64.deb (--unpack) 时出错:
尝试覆盖 '/usr/share/systemtap/tapset/node.stp',这也在软件包 libnode72:amd64 12.22.9~dfsg-1ubuntu3 中
发生了错误。
处理时遇到了错误:
/var/cache/apt/archives/nodejs_18.16.1-deb-1nodesource1_amd64.deb
E: 子进程 /usr/bin/dpkg 返回错误代码 (1)

英文:

While trying to install node js on linux I'm getting below error:

0 upgraded, 1 newly installed, 0 to remove and 3 not upgraded.
Need to get 0 B/28.7 MB of archives.
After this operation, 187 MB of additional disk space will be used.
(Reading database ... 378127 files and directories currently installed.)
Preparing to unpack .../nodejs_18.16.1-deb-1nodesource1_amd64.deb ...
Unpacking nodejs (18.16.1-deb-1nodesource1) ...
dpkg: error processing archive /var/cache/apt/archives/nodejs_18.16.1-deb-1nodes
ource1_amd64.deb (--unpack):
trying to overwrite '/usr/share/systemtap/tapset/node.stp', which is also in pa
ckage libnode72:amd64 12.22.9~dfsg-1ubuntu3
Errors were encountered while processing:
/var/cache/apt/archives/nodejs_18.16.1-deb-1nodesource1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

答案1

得分: 3

我遇到了类似的问题。我成功解决了这个问题,使用了下面的命令:

sudo dpkg -i --force-overwrite /var/cache/apt/archives/nodejs_18.16.1-deb-1nodesource1_amd64.deb

英文:

I had a similar issue. I was able to solve the issue using the following command below.

sudo dpkg -i --force-overwrite /var/cache/apt/archives/nodejs_18.16.1-deb-1nodesource1_amd64.deb

huangapple
  • 本文由 发表于 2023年6月30日 03:29:57
  • 转载请务必保留本文链接:https://go.coder-hub.com/76584107.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定