I think the docker images are not correctly up to date. It used to work (from Windows), but now I have to add "repl" to the examples given, and when I do that:
C:\src\swift $ docker run --cap-add sys_ptrace -it --rm swift swift repl
/usr/bin/lldb: error while loading shared libraries: libpython3.10.so.1.0: cannot open shared object file: No such file or directory
Am I doing something wrong or are these docker images no longer self-contained?
Edit: By the way, are Regex literals not supported on Linux? I can't seem to find a clear answer on it. I know it's not supported on release macOS and is on iOS.
docker run --privileged --cap-add sys_ptrace -it --rm swift swift repl
/usr/bin/lldb: error while loading shared libraries: libpython3.10.so.1.0: cannot open shared object file: No such file or directory
I created a container, attached to it and then got the same error inside the container when running swift repl.
I ran following commands inside the container:
apt update
apt install libpython3-dev
And then the error changed to:
root@ccdc861cb1c4:/# swift repl
Traceback (most recent call last):
File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'lldb'
error: failed to launch REPL process: 'A' packet returned an error: 8
Thank you for your response. It is exactly what I have done. I had to add "libpython3.10" to get it to work. I am wondering if the swift docker image needs to be updated to include this.
@bmontegani I made a PR that resolves the issue - installing the corrected version of libpython - and Mishal Shah merged it yesterday. Don't know how long it takes to flow out to updated docker images, but it should be resolved here pretty shortly.