Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have tried to install a few BioLinux packages -> several of the previous packages were 'broken'. After i ran :

apt-get -f install

apt-get upgrade 


apt-get upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages have been kept back:
r-cran-mass
The following packages will be upgraded:
desktop-file-utils

WARNING: The following packages cannot be authenticated!
desktop-file-utils
Install these packages without verification [y/N]? y
Reading changelogs... Done
(Reading database ... 
   dpkg: warning: files list file for package `desktop-file-utils' missing, assuming   package has no files currently installed.

Preparing to replace desktop-file-utils 0.15-2 (using .../desktop-file-utils_0.16- 0ubuntu2_amd64.deb) ...
Unpacking replacement desktop-file-utils ...
dpkg: error processing /var/cache/apt/archives/desktop-file-utils_0.16-0ubuntu2_amd64.deb (--unpack):
trying to overwrite '/etc/gnome/defaults.list', which is also in package gnome-session-common 2.30.2-3
 configured to not write apport reports
 Processing triggers for gnome-menus ...
 Processing triggers for man-db ...
 Errors were encountered while processing:
 /var/cache/apt/archives/desktop-file-utils_0.16-0ubuntu2_amd64.deb
 E: Sub-process /usr/bin/dpkg returned an error code (1)

I have also tried to reinstall it, updatem all,upgrade,reinstall agai, but i encounter the same issue.

Does anyone know the fix for this ? ( No OS reinstall though)

share|improve this question
add comment

1 Answer

up vote 0 down vote accepted

Don't really understand how you got yourself in this situation but apt is telling you it will overwrite /etc/gnome/defaults.list which is simply the list of default programs for gnome:

$ head /etc/gnome/defaults.list
[Default Applications]
application/rtf=abiword.desktop
application/x-abiword=abiword.desktop
text/abiword=abiword.desktop
text/richtext=abiword.desktop
text/rtf=abiword.desktop
text/x-abiword=abiword.desktop
text/x-xml-abiword=abiword.desktop
x-content/blank-bd=brasero-nautilus.desktop
x-content/blank-dvd=brasero-nautilus.desktop

You have a few options for "fixing" this problem:

  1. Do nothing. Unless there is a specific reason why you want to upgrade desktop-file-utils you can leave your system as is.

  2. Remove (rename) the offending file and try upgrading again. You can always move it back afterwards:

    mv /etc/gnome/defaults.list /etc/gnome/defaults.list.bak
    apt-get upgrade 
    

    Now you can compare the original file with the new one and decide which one to keep:

    diff /etc/gnome/defaults.list /etc/gnome/defaults.list.bak
    

    Or you can simply copy your old one back:

    mv /etc/gnome/defaults.list.bak /etc/gnome/defaults.list
    
  3. You can force the apt-get command to overwrite the file

    apt-get -o Dpkg::Options::="--force-overwrite" upgrade
    
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.