当我使用命令时,sudo apt-get install git
它会返回下面的错误,并且会返回下面要安装的任何应用程序:
Setting up util-linux (2.25.2-4ubuntu3) ...
update-alternatives: error: cannot stat file '/usr/bin/nodejs': Too many levels of symbolic links
dpkg: error processing package util-linux (--configure):
subprocess installed post-installation script returned error exit status 2
Errors were encountered while processing:
util-linux
E: Sub-process /usr/bin/dpkg returned an error code (1)
更新sudo apt-get update
不工作并报告以下错误
Fetched 7,032 kB in 5min 32s (21.2 kB/s)
W: Failed to fetch http://ppa.launchpad.net/paullo612/unityshell-rotated/ubuntu/dists/vivid/main/binary-amd64/Packages 404 Not Found
W: Failed to fetch http://ppa.launchpad.net/paullo612/unityshell-rotated/ubuntu/dists/vivid/main/binary-i386/Packages 404 Not Found
E: Some index files failed to download. They have been ignored, or old ones used instead.
如何修复它?
答案1
您有两个不相关的错误。第一个是/usr/bin/nodejs
属于包的文件nodejs
似乎已损坏。卸载和/或重新安装该包可能会修复该问题。
第二种情况是您启用了一个不再存在的存储库。您需要从存储库列表中删除该存储库,可以通过您正在使用的任何 GUI 工具或将其从您的 中删除sources.list
。