我无法在我的 ubuntu 14.04 机器上安装更新,由于 katepart 的依赖关系未得到满足,机器建议我使用apt-get 安装 -f修复它之后它显示以下错误
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following extra packages will be installed:
kate-data
The following NEW packages will be installed:
kate-data
0 upgraded, 1 newly installed, 0 to remove and 1 not upgraded.
78 not fully installed or removed.
Need to get 0 B/1,546 kB of archives.
After this operation, 10.1 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
(Reading database ... 587315 files and directories currently installed.)
Preparing to unpack .../kate-data_4%3a4.13.3-0ubuntu0.1_all.deb ...
Unpacking kate-data (4:4.13.3-0ubuntu0.1) ...
dpkg: error processing archive /var/cache/apt/archives/kate-data_4%3a4.13.3-0ubuntu0.1_all.deb (--unpack):
trying to overwrite '/usr/share/kde4/apps/katepart/syntax/nesc.xml',which is also in package nescc 1.3.4-2
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
Errors were encountered while processing:
/var/cache/apt/archives/kate-data_4%3a4.13.3-0ubuntu0.1_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
我该如何修复它?我已经尝试过问题的解决方案为什么 dpkg 在安装更新时会出现“管道损坏”错误?
答案1
命令应该是
sudo apt-get install -f
尝试这个:
sudo apt-get autoclean
(这将清除缓存)sudo apt-get clean
(与上面几乎相同,但跑步也不会有害处)sudo apt-get autoremove
(以防万一
然后尝试重新安装 katepart。
答案2
尝试使用 aptitude 命令。它似乎很好地解决了软件包和库之间的依赖关系。但首先使用 aptitude 和 apt-get 运行清理步骤。最后在 /etc/apt/sources.list 中使用更多下载源更新存储库。