skip to Main Content

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:Usersuser01> 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

2

Answers


  1. Chosen as BEST ANSWER

    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@USLAP3XP7G63:/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.


  2. just put in terminal:

    sudo do-release-upgrade
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search