Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

apt-get upgrade fails after installing (and trying to remove) docker-ce #2288

Closed
gravityFlower opened this issue Jul 5, 2017 · 4 comments
Closed

Comments

@gravityFlower
Copy link

Windows version used:
Microsoft Windows [Version 10.0.15063]

problem:

after installing docker-ce i am unable to upgrade.

The hint given to me by the console to remove it first was tried but returned also with an error.

$ apt-get remove docker-ce
[...]
dpkg: Fehler beim Bearbeiten des Paketes docker-ce (--remove):
Paket ist in einem sehr schlechten inkonsistenten Zustand - Sie sollten
es erneut installieren, bevor Sie es zu entfernen versuchen.
Fehler traten auf beim Bearbeiten von:
docker-ce
E: Sub-process /usr/bin/dpkg returned an error code (1)

After getting this error i tried to reinstall it as suggested, but was still not able to remove it.

Now it seems to be not possible to upgrade

#apt-get upgrade
[...]
libgcrypt20:amd64 (1.6.5-2ubuntu0.3) wird eingerichtet ...
Trigger für libc-bin (2.23-0ubuntu9) werden verarbeitet ...1
(Lese Datenbank ... 40043 Dateien und Verzeichnisse sind derzeit installiert.)
Vorbereitung zum Entpacken von .../docker-ce_17.06.0ce-0ubuntu_amd64.deb ...
invoke-rc.d: could not determine current runlevel

  • Stopping Docker: docker
    No process in pidfile '/var/run/docker-ssd.pid' found running; none killed.
    invoke-rc.d: initscript docker, action "stop" failed.
    dpkg: Warnung: Unterprozess altes pre-removal-Skript gab den Fehlerwert 1 zurück
    dpkg: stattdessen wird Skript aus dem neuen Paket probiert ...
    invoke-rc.d: could not determine current runlevel
  • Stopping Docker: docker
    No process in pidfile '/var/run/docker-ssd.pid' found running; none killed.
    invoke-rc.d: initscript docker, action "stop" failed.
    dpkg: Fehler beim Bearbeiten des Archivs /var/cache/apt/archives/docker-ce_17.06.0~ce-0~ubuntu_amd64.deb (--unpack):
    Unterprozess neues pre-removal-Skript gab den Fehlerwert 1 zurück
    dpkg: Fehler beim Aufräumen:
    Unterprozess installiertes post-installation-Skript gab den Fehlerwert 1 zurück
    Fehler traten auf beim Bearbeiten von:
    /var/cache/apt/archives/docker-ce_17.06.0ce-0ubuntu_amd64.deb
    E: Sub-process /usr/bin/dpkg returned an error code (1)
@AntonOks
Copy link

  • sudo rm /var/lib/dpkg/info/docker-ce.prerm
  • sudo apt-get remove docker-ce

@didyhu
Copy link

didyhu commented Nov 20, 2017

The reason may be in the log:

Stopping Docker: docker
No process in pidfile '/var/run/docker-ssd.pid' found running; none killed.
invoke-rc.d: initscript docker, action "stop" failed.

And this broke the whole installation.

Try:
backup and empty the contents of file: /etc/init.d/docker,
then,
#sudo apt remove docker.io

@jstachowiak
Copy link

docker-ce package pre-removal script does not handle gracefully stopping docker deamon if one is not running. As a temporary solution, you can comment out the following lines in /var/lib/dpkg/info/docker-ce.prerm and then try again.

if ([ -x "/etc/init.d/docker" ] || [ -e "/etc/init/docker.conf" ]) && \
   [ "$1" = remove ]; then
        invoke-rc.d docker stop || exit $?
fi

P.S. The same steps apply when removing docker.io.

@therealkenc
Copy link
Collaborator

docker-ce package pre-removal script does not handle gracefully stopping docker deamon

Thank-you for tracking down the fail. The error is from userspace and not WSL actionable. Running docker inside WSL2 is possible and won't result in getting backed into an apt package corner. On WSL1 docker is de-facto unsupported.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants