Univention-ckeditor Error update failed

I upgraded my Mail Server to UCS 4.3.0
After a reboot I executed successfully all pending join scripts.
After that the system notified me that package updates are available so I tried to install package updates but I got this error:

Starting univention-upgrade. Current UCS version is 4.3-0 errata3

Checking for local repository:                          none
Checking for package updates:                           found

The following packages will be REMOVED:
 univention-ckeditor

Do you want to continue [Y|n]? Y

Starting package upgrade                                ERROR: update failed. Please check /var/log/univention/updater.log

looking inside updater.log I noticed:

Starting univention-upgrade. Current UCS version is 4.3-0 errata3

Checking for local repository:                          none
Checking for package updates:                           found

The following packages will be REMOVED:
 univention-ckeditor
Starting dist-update at Tue Mar 27 08:46:18 2018...
Starting package upgrade                               Lettura elenco dei pacchetti...
Generazione albero delle dipendenze...
Lettura informazioni sullo stato...
Calcolo dell'aggiornamento...
I seguenti pacchetti saranno RIMOSSI:
  univention-ckeditor
0 aggiornati, 0 installati, 1 da rimuovere e 0 non aggiornati.
1 non completamente installati o rimossi.
Dopo quest'operazione, verranno liberati 2.800 kB di spazio su disco.
(Lettura del database... 96766 file e directory attualmente installati.)
Rimozione di univention-ckeditor (4.5.7-1)...
/var/lib/dpkg/info/univention-ckeditor.postrm: 21: /var/lib/dpkg/info/univention-ckeditor.postrm: Syntax error: "(" unexpected
dpkg: errore nell'elaborare il pacchetto univention-ckeditor (--remove):
 il sottoprocesso installato script di post-removal ha restituito lo stato di errore 2
Si sono verificati degli errori nell'elaborazione:
 univention-ckeditor
E: Sub-process /usr/bin/dpkg returned an error code (1)
 exitcode of apt-get dist-upgrade: 100
ERROR: update failed. Please check /var/log/univention/updater.log

What can I do to correctly remove univention-ckeditor?

Hey,

this looks like the postrm script is using bash features but is running with dash. The script likely starts with #!/bin/sh, and that is most likely a symlink to /bin/dash (that’s the default on Debian/UCS anyway). There are two things you can try:

  1. Make /bin/sh point to /bin/bash. This is safe to do — the only drawback is that bash is slightly slower than dash, but this is really not noticeable. In order to do that, run the following: ln -sf bash /bin/sh
  2. Modify the postrm script so that its first line reads #!/bin/bash instead of #!/bin/sh. This is safe to do as well.

Afterwards try removing the package manually via dpkg --purge univention-ckeditor

Where did you get that package from anyway? I cannot find it, neither on 4.2 nor on 4.3.

Kind regards,
mosu

Thanks @Moritz_Bunkus your solution was OK.

Do you think is it better to go back to /bin/dash now?

I really don’t know where uninvention-ckeditor comes from, I can only say that after --purge univention-ckeditor I checked available updates and I found that Horde Webmail needs an update.

Hey,

I usually leave sh pointing to bash due to the number of scripts out there that use bash features but incorrectly use #!/bin/sh as their interpreter. Back in the day bash was the default anyway — Debian just changed to dash a couple of years ago.

Kind regards,
mosu

Mastodon