2

I just upgraded to 18.04. Unfortunately during the update my laptop got stuck and restarted. After the restart everything seemed to work. A gig of updates later I got stuck on this problem. Apt dist-upgrade threw an error because of unmet dependencies and now I get the following Output when trying to fix it with apt --fix-broken install

    sudo apt --fix-broken install
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    Correcting dependencies... Done
    The following packages were automatically installed and are no longer required:
      libkf5calendarcore5 libkf5libkdepim5abi1 libkf5pimcommon5abi2
    Use 'sudo apt autoremove' to remove them.
    The following additional packages will be installed:
      libkf5akonadicalendar5abi2 libkf5alarmcalendar-data
      libkf5alarmcalendar5abi1 libkf5mailtransport-data
      libkf5mailtransport5abi2
    The following packages will be REMOVED:
      kio-smtp libkf5alarmcalendar5
    The following NEW packages will be installed:
      libkf5akonadicalendar5abi2 libkf5alarmcalendar5abi1
      libkf5mailtransport5abi2
    The following packages will be upgraded:
      libkf5alarmcalendar-data libkf5mailtransport-data
    2 upgraded, 3 newly installed, 2 to remove and 10 not upgraded.
    41 not fully installed or removed.
    Need to get 0 B/584 kB of archives.
    After this operation, 743 kB of additional disk space will be used.
    Do you want to continue? [Y/n] y
    (Reading database ... 278631 files and directories currently installed.)
    Preparing to unpack .../libkf5mailtransport-data_17.12.3-0ubuntu4_all.deb ...
    Unpacking libkf5mailtransport-data (17.12.3-0ubuntu4) over (17.04.3-0ubuntu1) ...
    dpkg: error processing archive /var/cache/apt/archives/libkf5mailtransport-data_17.12.3-0ubuntu4_all.deb (--unpack):
     trying to overwrite '/etc/xdg/kmailtransport.categories', which is also in package kio-smtp 17.04.3-0ubuntu1
    dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
    Errors were encountered while processing:
     /var/cache/apt/archives/libkf5mailtransport-data_17.12.3-0ubuntu4_all.deb
    E: Sub-process /usr/bin/dpkg returned an error code (1)

Here is also the output of apt upgrade for completeness sake:

sudo apt upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 kde-config-mailtransport : Depends: libkf5mailtransport-data (= 17.12.3-0ubuntu4) but 17.04.3-0ubuntu1 is installed
                            Depends: libkf5mailtransport5abi2 (>= 17.07.70+git20170701) but it is not installed
 kdepim-runtime : Depends: libkf5akonadicalendar5abi2 (>= 4:17.07.70+git20170920.1507) but it is not installed
                  Depends: libkf5alarmcalendar5abi1 (>= 4:17.11.70+git20170926.0843) but it is not installed
                  Depends: libkf5mailtransport5abi2 (>= 17.07.70+git20170701) but it is not installed
 libkf5alarmcalendar5 : Depends: libkf5akonadicore5 (>= 4:15.12.0) but it is not installable
 libkf5mailtransportakonadi5 : Depends: libkf5mailtransport-data (= 17.12.3-0ubuntu4) but 17.04.3-0ubuntu1 is installed
                               Depends: libkf5mailtransport5abi2 (>= 17.07.70+git20170701) but it is not installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

As I said this output was my main reason to even try apt --fix-broken install

As it turns out I just needed to remove kio-smtp package for this to work again. Since normal apt operations wouldn't work because of the unmet dependencies I did it with:

sudo dpkg -r --force-depends kio-smtp

to circumvent the dependency checks.

1 Answers1

1

You are trying to install a new package libkf5mailtransport-data that contains a file that are allready installed in another package kio-smtp - see 7. last line in the --fix-broken output:

Unpacking libkf5mailtransport-data (17.12.3-0ubuntu4) over (17.04.3-0ubuntu1) ...
dpkg: error processing archive /var/cache/apt/archives/libkf5mailtransport-data_17.12.3-0ubuntu4_all.deb (--unpack):
 trying to overwrite '/etc/xdg/kmailtransport.categories', which is also in package kio-smtp 17.04.3-0ubuntu1

Two packages containing same files can not be installed at the same time. A quick-and-dirty hack would be to rename the offending file, and after the install check old and new file for differences. You might have to do this to get out of the current locked situation. But this will certainly give problems later.

As a permanent solution you might have to uninstall kio-smtp.

Soren A
  • 7,191