为什么apt-get提示我运行-f install但是无法正常运行?
当我尝试通过 安装某些软件时apt-get install xxx
,它提示我运行:
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies.
libc6-dev : Depends: libc6 (= 2.17-0ubuntu5.1) but 2.17-0ubuntu5 is to be installed
libc6-i386 : Depends: libc6 (= 2.17-0ubuntu5.1) but 2.17-0ubuntu5 is to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
但是当我运行时apt-get -f install
,发生了另一个错误:
...
dpkg: warning: files list file for package 'libkfile4' missing; assuming package has
no files currently installed
dpkg: warning: files list file for package 'kollision' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libexempi3:amd64' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'picmi' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'kdenetwork' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libgsl0-dev' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'xserver-xorg-input-vmmouse' missing; assuming package has no files currently installed
(Reading database ... 8041 files and directories currently installed.)
Preparing to replace libc6:amd64 2.17-0ubuntu5 (using .../libc6_2.17-0ubuntu5.1_amd64.deb) ...
De-configuring libc6:i386 ...
A copy of the C library was found in an unexpected directory:
'/lib/x86_64-linux-gnu/libc-2.17.so'
It is not safe to upgrade the C library in this situation;
please remove that copy of the C library or get it out of
'/lib/x86_64-linux-gnu' and try again.
dpkg: error processing /var/cache/apt/archives/libc6_2.17-0ubuntu5.1_amd64.deb (--unpack):
subprocess new pre-installation script returned error exit status 1
No apport report written because MaxReports has already been reached
Errors were encountered while processing:
/var/cache/apt/archives/libc6_2.17-0ubuntu5.1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
答案1
在终端中使用以下命令
sudo apt-get clean
sudo apt-get update && sudo apt-get upgrade
如果遇到同样的错误,请尝试:
sudo dpkg --configure -a
sudo apt-get -f install