首页 文章

nodejs-legacy无法安装

提问于
浏览
0

我正在尝试在ubuntu中安装nodejs-legacy但它提供了错误 . 请帮助 . 我还删除了本地system中所有来源nodejs留下的所有痕迹 . 我们也做了:sudo apt-get install autoclean sudo apt-get install nodejs-legacy

不起作用

请建议

The following NEW packages will be installed:
  nodejs-legacy
0 upgraded, 1 newly installed, 0 to remove and 9 not upgraded.
Need to get 14.6 kB of archives.
After this operation, 122 kB of additional disk space will be used.
Get:1 http://in.archive.ubuntu.com/ubuntu/ trusty/universe nodejs-legacy all 0.10.25~dfsg2-2ubuntu1 [14.6 kB]
Fetched 14.6 kB in 0s (18.4 kB/s)      
(Reading database ... 261633 files and directories currently installed.)
Preparing to unpack .../nodejs-legacy_0.10.25~dfsg2-2ubuntu1_all.deb ...
Unpacking nodejs-legacy (0.10.25~dfsg2-2ubuntu1) ...
dpkg: error processing archive /var/cache/apt/archives/nodejs-legacy_0.10.25~dfsg2-2ubuntu1_all.deb (--unpack):
 trying to overwrite '/usr/share/man/man1/node.1.gz', which is also in package nodejs 0.10.37-1chl1~trusty1
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
Errors were encountered while processing:
 /var/cache/apt/archives/nodejs-legacy_0.10.25~dfsg2-2ubuntu1_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
manish@manish-Lenovo-IdeaPad-Z510:/var/cache/apt/archives$ whereis nodejs
nodejs:
manish@manish-Lenovo-IdeaPad-Z510:/var/cache/apt/archives$ which nodejs
manish@manish-Lenovo-IdeaPad-Z510:/var/cache/apt/archives$

3 回答

  • 0

    sudo dpkg -i /var/cache/apt/archives/nodejs-legacy_0.10.25〜dfsg2-2ubuntu1_all.deb

  • 2

    通过强制OverWriting这些命令,它对我有用 .

    sudo dpkg -i --force-overwrite /var/cache/apt/archives/nodejs-legacy_0.10.25~dfsg2-2ubuntu1_all.deb
    sudo apt-get -f install
    
  • 1

    似乎有一个安装包 nodejs ,它有一些文件与 node-legacy 包重叠 .

    您是否尝试先卸载 nodejs 包?

相关问题