在Ubuntu 22.04上安装NodeJS 16时管道破裂

idfiyjo8  于 2022-09-20  发布在  其他
关注(0)|答案(1)|浏览(602)

**已关闭。**此问题为not about programming or software development。它目前不接受答案。

这个问题似乎与a specific programming problem, a software algorithm, or software tools primarily used by programmers无关。如果你认为这个问题会在another Stack Exchange site上出现,你可以留下评论,解释在哪里可以回答这个问题。

6天前关门了。
Improve this question

正在尝试在ubuntu 22.04上安装NodeJS 16。

已运行官方安装说明:

sudo apt-get install -y nodejs

出现以下错误:

The following NEW packages will be installed:
  nodejs
0 upgraded, 1 newly installed, 0 to remove and 4 not upgraded.
Need to get 0 B/27.1 MB of archives.
After this operation, 128 MB of additional disk space will be used.
Selecting previously unselected package nodejs.
(Reading database ... 218989 files and directories currently installed.)
Preparing to unpack .../nodejs_16.17.0-deb-1nodesource1_amd64.deb ...
Unpacking nodejs (16.17.0-deb-1nodesource1) ...
dpkg: error processing archive /var/cache/apt/archives/nodejs_16.17.0-deb-1nodesource1_amd64.deb (--unpack):
 trying to overwrite '/usr/include/node/common.gypi', which is also in package libnode-dev 12.22.9~dfsg-1ubuntu3
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Errors were encountered while processing:
 /var/cache/apt/archives/nodejs_16.17.0-deb-1nodesource1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
iszxjhcz

iszxjhcz1#

不同版本的Node.js使用相同的文件(一个来自apt install,一个来自手动下载),这导致了冲突,从而导致了错误。

首先删除您的Node.js 12.22.9。

相关问题