REPL error after installing Swift on a fresh WSL with Ubuntu 20.04

after installing Ubuntu 20.04 as a WSL, I get the follwoing error when trying to start a REPL:

/swift-5.9-RELEASE-ubuntu20.04/usr/bin/lldb: error while loading shared libraries: cannot open shared object file: No such file or directory

The Ubuntu 20.04 of WSL comes with python 3.10 by default, and has (probably, somewhere) a libpython3.10.

Has anyone else encountered this problem? Or knows how to fix it?

I fixed it.

Apparently, on my Ubuntu installation, the shared libraries for Python are located at /usr/lib/x86_64-linux-gnu/, where those files exist:

The 3.10 version seems to be the default version for my setup. It's also what apt-get install libpython-dev installs.

I then tried to use the 3.10 shared library as the 3.8 verion that lldb expects.

After trying different approaches (linking vs. copying, different target directories), it finnaly worked when I directly copied the library to /usr/lib.

Gotta be honest, it was kind of frustrating having to manually fix somthing what shouldn't need to be fixed to begin with.

I get that this is an external dependency, but it should work out of the box anyways.