dpkg-divert: error: cambiar el nombre implica un error de sobrescritura después de actualizar de 16.04 a 16.10


44

Recibí un error extraño después de actualizar Ubuntu 16.04 a 16.10.

El Actualizador de software sugiere una actualización parcial:

No se pudo instalar 'systemd-shim'

La actualización continuará, pero el paquete 'systemd-shim' puede no estar funcionando. Considere enviar un informe de error al respecto.

subprocess installed post-removal script returned error exit status 2

sudo apt-get update termina sin ningún error.

sudo apt-get remove salidas esto

The following packages will be REMOVED:
  systemd-shim
0 to upgrade, 0 to newly install, 1 to remove and 0 not to upgrade.
1 not fully installed or removed.
After this operation, 71.7 kB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 1451244 files and directories currently installed.)
Removing systemd-shim (9-1bzr4ubuntu1) ...
Removing 'diversion of /usr/share/dbus-1/system-services/org.freedesktop.systemd1.service to /usr/share/dbus-1/system-services/org.freedesktop.systemd1.service.systemd by systemd-shim'
dpkg-divert: error: rename involves overwriting '/usr/share/dbus-1/system-services/org.freedesktop.systemd1.service' with
  different file '/usr/share/dbus-1/system-services/org.freedesktop.systemd1.service.systemd', not allowed
dpkg: error processing package systemd-shim (--remove):
 subprocess installed post-removal script returned error exit status 2
Errors were encountered while processing:
 systemd-shim
E: Sub-process /usr/bin/dpkg returned an error code (1)

Por favor, ayúdame a corregir este error. Gracias.

Respuestas:


82
  1. Usando el terminal, cambie el nombre /usr/share/dbus-1/system-services/org.freedesktop.systemd1.servicea /usr/share/dbus-1/system-services/org.freedesktop.systemd1.service.bak:

    sudo mv /usr/share/dbus-1/system-services/org.freedesktop.systemd1.service /usr/share/dbus-1/system-services/org.freedesktop.systemd1.service.bak
    
  2. Proceda a correr de sudo apt upgradenuevo.

Esperemos que no systemd-shimaparezcan más errores.

Cambie el nombre del archivo a lo que era si tiene algún problema.


18
También tuve este problema al pasar de 16.04 a 18.04. Tu solución también funciona allí.
Haydentech

@Haydentech yo también, las actualizaciones de Ubuntu son un gran dolor askubuntu.com/questions/1085665/…
baptx
Al usar nuestro sitio, usted reconoce que ha leído y comprende nuestra Política de Cookies y Política de Privacidad.
Licensed under cc by-sa 3.0 with attribution required.