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.

When i try to install a (random) package i got the following error.

The following packages have unmet dependencies:
linux-tools-3.2.0-24 : Depends: linux-tools-common but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

I tried :

apt-get -f install

And i got the following error message :

The following extra packages will be installed:
  linux-tools-common
The following NEW packages will be installed:
  linux-tools-common
0 upgraded, 1 newly installed, 0 to remove and 36 not upgraded.
2 not fully installed or removed.
Need to get 0 B/69.3 kB of archives.
After this operation, 183 kB of additional disk space will be used.
Do you want to continue [Y/n]? Y
(Reading database ... 183468 files and directories currently installed.)
Unpacking linux-tools-common (from .../linux-tools-common_3.2.0-25.40_all.deb) ...
dpkg: error processing /var/cache/apt/archives/linux-tools-common_3.2.0-25.40_all.deb (--unpack):
 trying to overwrite '/usr/share/man/man1/perf.1.gz', which is also in package linux-base 3.4ubuntu2
Processing triggers for man-db ...
Errors were encountered while processing:
 /var/cache/apt/archives/linux-tools-common_3.2.0-25.40_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

What should I do next?


EDIT:

https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1008713

EDIT2:

I manage to remove the error rebooting ubuntu in the recovery mode and i ran dpkg Repair broken Package

share|improve this question
add comment

2 Answers

You really didn't say how you tried to install, but here is what I did.

I just pressed Ctrl+Alt+T on the keyboard to open Terminal. When it opened, I ran run this command.

sudo apt-get install linux-tools-3.2.0-25

And that worked with no errors. I'm running 12.04 updated just a few minutes ago.

You can also install Linux Tools from USC

Make sure you have the correct Kernel version before you install, because this is version specific.

Try

sudo apt-get -f install

To fix dependencies problems, Try these commands:

  1. Update your sources.list

    sudo apt-get update
    
  2. Clean any partial packages left behind during the wreckage.

    sudo apt-get autoclean
    
  3. Clean your apt-cache

    sudo apt-get clean
    

And try the installation again.

share|improve this answer
    
The problem is that I cannot install new package, because dependencies are broken. (I did what you asked with the version 3.2.0-24, but i got the same error message as before) –  moeryn Jun 21 '12 at 14:17
    
autoclean doesn't do anything that isn't also done by clean. In particular, it doesn't clean up any files from partially installed packages. If you're running clean, you don't need to use autoclean as well. See the manpage for details. –  Eliah Kagan Jun 30 '12 at 6:23
add comment

You should use a program like gdebi Install gdebi. That could solve your problem, as this program downloads and installs unmet dependencies for packages.

gdebi is usually already installed on your Ubuntu system. Press Alt+F2, type gksu gdebi (or on Kubuntu, kdesudo gdebi), and press Enter.

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.