WSL 1 running Ubuntu 20.04 will have problems

A post on the Ubuntu forum pointed out that Windows Linux subsystem WSL 1 will have problems when running Ubuntu 20.04 LTS, reminding users to pay attention to the use of related versions.

The problem comes from the patch in glibc 2.31, which implements the nanosleep () library call based on CLOCK_REALTIME in a manner similar to UNIX. Simulating the UNIX system clock on the NT kernel is tricky. WSL 1 implements the most popular clock-based system calls, but not all of them are implemented, and CLOCK_REALTIME support is not built into nanosleep.

It will take some time for WSL 1 to fully implement this support, and unless you are a Windows Insider user, you may not see the problem fixed for several months. Without this fix, Ubuntu 20.04 on WSL 1 will often crash, and there will be problems even during the upgrade to Ubuntu 20.04.

What can users do? For WSL 1 users, it is recommended to stay in Ubuntu 18.04 LTS temporarily and not upgrade to 20.04 (released in a few weeks).

For WSL 2 users, Ubuntu 20.04 can be freely upgraded when it is released, and even earlier can be tested with an unstable version.

For WSL 1 users upgrading to WSL 2, when Ubuntu 20.04 is available, you should first use the following command to convert the Ubuntu 18.04 image to WSL 2:

$ wsl.exe --set-version Ubuntu 2

Then upgrade it to 20.04.

And if you want to upgrade Ubuntu 20.04 from WSL 1 anyway, then before upgrading, prevent libc6 update:

$ sudo apt-mark hold libc6

See the original post for more details: https://discourse.ubuntu.com/t/ubuntu-20-04-and-wsl-1/15291

Guess you like

Origin www.oschina.net/news/114843/wsl1-ubuntu-glibc-issue