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
  • 66,947
  • 30
  • 177
  • 264
user271401
  • 71
  • 1
  • 3
  • 1
    related bug report https://bugs.launchpad.net/ubuntu/+source/gnome-settings-daemon/+bug/1286404 – Dmitry Belaventsev Apr 20 '14 at 15:46
  • 3
    This question does not require any further editing other than by the OP to respond to additional queries. Thanks. – fossfreedom Apr 23 '14 at 14:17
  • possible duplicate of [dpkg error: "trying to overwrite file, which is also in..."](http://askubuntu.com/questions/176121/dpkg-error-trying-to-overwrite-file-which-is-also-in) – Radu Rădeanu May 01 '14 at 06:30

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
  • 293,910
  • 41
  • 570
  • 710
Radu Rădeanu
  • 166,822
  • 48
  • 327
  • 400
  • 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
  • 66,947
  • 30
  • 177
  • 264
  • 1
    -1 because this is not the way how a user should interact with Ubuntu: to remove all the PPA repositories when upgrading (which is your main point in the answer). – Radu Rădeanu Apr 23 '14 at 06:50
  • @RaduRădeanu ["Before upgrading your system to a new Ubuntu release (i.e. from Ubuntu 13.04 to 13.10), **you should probably run ppa-purge ppa:gnome3-team/gnome3 first.](https://launchpad.net/~gnome3-team/+archive/gnome3)**" Before upgrading your system, you should remove PPA's that will be in the way – Braiam Apr 23 '14 at 14:00
  • 2
    @Braiam You very likely have the exact cause of the issue here but the fix is a bit lacklustre. I'm not sure what stage the upgrade is at but could the user retroactively ppa-purge the old versions (or delete all orphaned gnome packages?). Picking through packages manually is likely going to leave a system full of mixed 3.10 and 3.08 versions. *Edit* Just saw the last line... Maybe work that into the answer more? – Oli Apr 23 '14 at 14:15
  • @Oli actually no, if OP removes all the packages ending in saucy, [which is appended](https://launchpad.net/~gnome3-team/+archive/gnome3?field.series_filter=saucy) for them all, through for a moment he wouldn't have desktop at all but at the end the packages will fit in place – Braiam Apr 23 '14 at 14:21
  • @Braiam *...probably...* (not sure). And removing gnome PPA can have no effects, because it was probably already automatically disabled through the `do-release-upgrade` command (the OP already uses 14.04 - see [1st revision](http://askubuntu.com/revisions/451254/1)). – Radu Rădeanu Apr 23 '14 at 17:17
  • @RaduRădeanu come on. It's a fact that it cause problems otherwise OP wouldn't ask this question, don't you think? – Braiam Apr 23 '14 at 20:40
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
  • 3
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