35

I'm trying to install the latest KDE Plasma here but I'm getting

You might want to run 'apt-get -f install' to correct these.
The following packages have unmet dependencies:
kde-telepathy-minimal:
  Depends: kde-config-telepathy-accounts (>= 0.9.0) but it is not installed
E: Unmet dependencies. Try using -f.

and when I sudo apt-get -f install as specified and I say Y to getting 122KB of archives I get:

Preparing to unpack .../kde-config-telepathy-accounts_15.04.0-0ubuntu1~ubuntu15.04~ppa1_amd64.deb ...
Unpacking kde-config-telepathy-accounts (15.04.0-0ubuntu1~ubuntu15.04~ppa1) ...
dpkg: error processing archive /var/cache/apt/archives/kde-config-telepathy-accounts_15.04.0-0ubuntu1~ubuntu15.04~ppa1_amd64.deb (--unpack):
 trying to overwrite '/usr/share/accounts/services/facebook-im.service', which is also in package account-plugin-facebook 0.12+15.04.20150415.1-0ubuntu1
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Errors were encountered while processing:
 /var/cache/apt/archives/kde-config-telepathy-accounts_15.04.0-0ubuntu1~ubuntu15.04~ppa1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

And whenever I try to install any other package now I get the same thing. What should I do?

David Foerster
  • 36,264
  • 56
  • 94
  • 147
Sam
  • 1,425
  • 1
  • 11
  • 14
  • 1
    I used sudo rm to delete "/usr/share/accounts/services/facebook-im.service" which it seems not able to overwrite but I get the same message with the same file although it's not there anymore! – Sam May 08 '15 at 22:52
  • 1
    Note that this seems to be a VERY common bug. See here: https://bugs.launchpad.net/kubuntu-ppa/+bug/1451728. There's a similar solution to the accepted answer, but different enough that it may matter to somebody. – jvriesem Nov 04 '16 at 19:41
  • I was trying to do a simple sudo apt upgrade of an Ubuntu 16.04 installation and got basically the same error, but conflicting with account-plugin-google which was solved by the accepted answer. – FKEinternet Mar 27 '20 at 05:31

3 Answers3

92

Fixed it by:

sudo dpkg -P unity-scope-gdrive account-plugin-google account-plugin-facebook
sudo apt-get install -f

This removes the packages listed in the first command and thus resolves the package conflict.

David Foerster
  • 36,264
  • 56
  • 94
  • 147
Sam
  • 1,425
  • 1
  • 11
  • 14
8

By default, the package manager refuses to overwrite files that also appear in other installed packages (whether the file is actually there or not), which is a sane decision to not inadvertently corrupt packages. In your case, this means, that the packages are incompatible. I can see that one seems to come from a PPA, so you should write to the maintainer of that PPA to investigate the issue.

Meanwhile, since the conflicting file is only and icon, it's pretty safe to override the package manager's decision with --force-overwrite:

cd /tmp
apt-get download kde-config-telepathy-accounts
sudo dpkg -i --force-overwrite kde-config-telepathy-accounts_*.deb
sudo apt-get install -f
David Foerster
  • 36,264
  • 56
  • 94
  • 147
5

I solved with the following:

  1. Find the deb that is causing the problems:

    sudo find /var/cache -name "kde-config-telepathy-accounts*"
    

    In my case the package was at

    /var/cache/apt/archives/kde-config-telepathy-accounts_4%3a15.12.3-0ubuntu1_amd64.deb
    
  2. Install it with --force-overwrite:

    sudo dpkg -i --force-overwrite /var/cache/apt/archives/kde-config-telepathy-accounts_4%3a15.12.3-0ubuntu1_amd64.deb
    

    The command will complete with errors anyway

  3. Fix the installation

    sudo apt-get -f install
    
Vincenzo Pii
  • 1,839