Search code examples
dockerwindows-10windows-subsystem-for-linux

Problem with Docker on Windows [version `GLIBC_2.32' not found] [version `GLIBC_2.34' not found]


I am following a beginners tutorial for installing Docker on Windows using WSL2.

It's one of the first tutorials/lectures here in this course.

https://www.udemy.com/course/docker-and-kubernetes-the-complete-guide/

I did everything as told so far. To verify that my docker setup is OK,
at the end the tutorial is telling me to just run docker inside my
default WSL Linux Distro (which is Ubuntu, that's how it came).

So I ran docker but I got this error.

/mnt/wsl/docker-desktop/cli-tools/usr/bin/com.docker.cli: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found (required by /mnt/wsl/docker-desktop/cli-tools/usr/bin/com.docker.cli)

/mnt/wsl/docker-desktop/cli-tools/usr/bin/com.docker.cli: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by /mnt/wsl/docker-desktop/cli-tools/usr/bin/com.docker.cli)

Trying to fix the error I upgraded all Linux packages which were upgradable.
Still no luck. Seems it's saying it needs higher version of GLIBC than mine.
But also, I see no way to further upgrade my GLIBC version. Right?

What should I do to fix this issue?

root@LAPTOP1:/mnt/c/Users/user01# docker
/mnt/wsl/docker-desktop/cli-tools/usr/bin/com.docker.cli: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found (required by /mnt/wsl/docker-desktop/cli-tools/usr/bin/com.docker.cli)
/mnt/wsl/docker-desktop/cli-tools/usr/bin/com.docker.cli: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by /mnt/wsl/docker-desktop/cli-tools/usr/bin/com.docker.cli)
root@LAPTOP1:/mnt/c/Users/user01# ldd --version
ldd (Ubuntu GLIBC 2.31-0ubuntu9.14) 2.31
Copyright (C) 2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by Roland McGrath and Ulrich Drepper.
root@LAPTOP1:/mnt/c/Users/user01# apt-cache policy libc6
libc6:
  Installed: 2.31-0ubuntu9.14
  Candidate: 2.31-0ubuntu9.14
  Version table:
 *** 2.31-0ubuntu9.14 500
        500 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages
        500 http://security.ubuntu.com/ubuntu focal-security/main amd64 Packages
        100 /var/lib/dpkg/status
     2.31-0ubuntu9 500
        500 http://archive.ubuntu.com/ubuntu focal/main amd64 Packages
root@LAPTOP1:/mnt/c/Users/user01# apt-get install libc6
Reading package lists... Done
Building dependency tree
Reading state information... Done
libc6 is already the newest version (2.31-0ubuntu9.14).
0 upgraded, 0 newly installed, 0 to remove and 11 not upgraded.
root@LAPTOP1:/mnt/c/Users/user01#


        

These are my distros.

PS C:\Users\user01> wsl --list --verbose
  NAME                   STATE           VERSION
* Ubuntu                 Running         2
  docker-desktop         Running         2
  docker-desktop-data    Running         2

And this is my WSL Ubuntu version.

root@LAPTOP1:/mnt/c/Users/user01# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 20.04.6 LTS
Release:        20.04
Codename:       focal

Solution

  • I upgraded my Ubuntu version by following the instructions given here.

    https://askubuntu.com/a/1428481

    Now my version is 22.04.3 LTS.

    root@LAPTOP1:/mnt/c/Users/user01# lsb_release -a
    No LSB modules are available.
    Distributor ID: Ubuntu
    Description:    Ubuntu 22.04.3 LTS
    Release:        22.04
    Codename:       jammy
    root@LAPTOP1:/mnt/c/Users/user01#
    
        
    

    And it seems that solved my problem. Now I am not getting that GLIBC error when I run docker from within the Ubuntu command prompt.

    I don't know why by default WSL2 doesn't install directly this version 22.04.3 LTS. Not sure what's the point of having to upgrade it manually later on.