7

While upgrading to 14.04 I ran into a dependency issue gnome-settings-daemon-schemas which blocked the upgrade. After running sudo apt-get -f install I get:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following extra packages will be installed:
  gnome-settings-daemon-schemas
The following NEW packages will be installed:
  gnome-settings-daemon-schemas
0 upgraded, 1 newly installed, 0 to remove and 530 not upgraded.
9 not fully installed or removed.
Need to get 0 B/44.2 kB of archives.
After this operation, 189 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 252639 files and directories currently installed.)
Preparing to unpack .../gnome-settings-daemon-schemas_3.8.6.1-0ubuntu11_all.deb ...
Unpacking gnome-settings-daemon-schemas (3.8.6.1-0ubuntu11) ...
dpkg: error processing archive /var/cache/apt/archives/gnome-settings-daemon-schemas_3.8.6.1-0ubuntu11_all.deb (--unpack):
 trying to overwrite '/usr/share/GConf/gsettings/gnome-settings-daemon.convert', which is also in package gnome-settings-daemon 3.10.2-0ubuntu1~saucy6

Processing triggers for gconf2 (3.2.6-0ubuntu2) ...
Errors were encountered while processing:
 /var/cache/apt/archives/gnome-settings-daemon-schemas_3.8.6.1-0ubuntu11_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
   Depends: gnome-settings-daemon-schemas (< 3.10) but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

What has caused this and how do I progress to fix it?


In case it's relevant, here's the original dependency hell:

The following packages have unmet dependencies:
 aptitude : Depends: aptitude-common (= 0.6.8.2-1ubuntu4) but it is not going to be installed
            Depends: libboost-iostreams1.54.0 but it is not going to be installed
            Depends: libcwidget3 but it is not going to be installed
            Depends: libept1.4.12 but it is not going to be installed
 compiz-gnome : Depends: gnome-settings-daemon-schemas (>= 3.4.2-0ubuntu9) but it is not going to be installed
 unity-settings-daemon : Depends: gnome-settings-daemon-schemas (>= 3.8) but it is not going to be installed
                         Depends: gnome-settings-daemon-schemas (< 3.10) but it is not going to be installed
Braiam
  • 67,791
  • 32
  • 179
  • 269
user271401
  • 71
  • 1
  • 3

4 Answers4

3

First of all, I tried to edit your question and make from it a canonical question for the following error:

Unpacking package_name ...
    dpkg: error processing archive /path/to/archive_name.deb (--unpack):
     trying to overwrite 'file_name', which is also in package another_package_name

My answer will be for this general case, but also for your particular case:

  1. You can solve your problem by running:

    sudo dpkg -i --force-overwrite /path/to/archive_name.deb
    • In your particular case:

      sudo dpkg -i --force-overwrite /var/cache/apt/archives/gnome-settings-daemon-schemas_3.8.6.1-0ubuntu11_all.deb
      
  2. If somehow the first step doesn't work, run also:

    sudo dpkg -i --force-all /path/to/archive_name.deb
    • In your particular case:

      sudo dpkg -i --force-all /var/cache/apt/archives/gnome-settings-daemon-schemas_3.8.6.1-0ubuntu11_all.deb
      
  3. Finally, run again:

    sudo apt-get -f install
    
    • If you have the same problem with another package, start again with first step.

Source

Rinzwind
  • 299,756
Radu Rădeanu
  • 169,590
  • meta and chat are for discussing edits ;) – Rinzwind Apr 23 '14 at 14:08
  • I'm sad that you use this method for all your problems. Following your advice OP will have a mixure of 3.10 gnome packages meant for saucy and some packages 3.6/3.8 meant for trusty. – Braiam Apr 23 '14 at 14:31
  • @Braiam Don't be. If you think that's the case, what's the problem? Better to overwrite them than remove them... If there are more packages with the same problem, apt-get -f install will complain about them. – Radu Rădeanu Apr 23 '14 at 17:12
2

This error is produced because before the installation you didn't removed/purged the gnome ppa along with the packages. This is evident since those package gnome-settings-daemon 3.10.2-0ubuntu1~saucy6 is not present in saucy repositories, but in gnome PPA's.

You can try removing one by one using dpkg all those packages ending in saucy:

sudo dpkg --remove package

remove all the PPA repositories and use aptitude remove '?version(*saucy*)' (if you have synaptic, that's another option) if you have it installed, downgrade it, or reinstall your system.

Braiam
  • 67,791
  • 32
  • 179
  • 269
1

This issue happened to me recently as well. Not only had to remove the Gnome repository I manually added to stay on the bleeding edge, but also purge all the Gnome packages that could have gotten in the way (i.e. came from that repository) and then, after apt-get update installed gnome-shell version from the Trusty repos, which of course, brought in all its dependencies, including gnome-settings-daemon-schemas. Hope, your mileage won't vary too much.

JSmyth
  • 111
0

Try running this command

sudo aptitude install gnome-settings-daemon

ref : https://bugs.launchpad.net/ubuntu/+source/gnome-settings-daemon/+bug/1278863/comments/16