我正在尝试在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 回答
sudo dpkg -i /var/cache/apt/archives/nodejs-legacy_0.10.25〜dfsg2-2ubuntu1_all.deb
通过强制OverWriting这些命令,它对我有用 .
似乎有一个安装包
nodejs
,它有一些文件与node-legacy
包重叠 .您是否尝试先卸载
nodejs
包?