Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Why apt-get prompt me to run -f install and it cannot be run properly?

When I am trying to install some software through apt-get install xxx, it prompts me to run:

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).

But when I run apt-get -f install, another error happens:

...
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)
share|improve this question
add comment

1 Answer 1

Use the following command in terminal

sudo apt-get clean
sudo apt-get update && sudo apt-get upgrade

If you get the same error try:

sudo dpkg --configure -a
sudo apt-get -f install
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.