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
Then to get that lldb-error away I ran:
apt install python3-lldb
ln -s /usr/lib/llvm-14/lib/python3.10/dist-packages/lldb/* /usr/lib/python3/dist-packages/lldb/
This hint was fetched from: ModuleNotFoundError: No module named 'lldb.embedded_interpreter' · Issue #55575 · llvm/llvm-project · GitHub
Now I am left with:
root@ccdc861cb1c4:/# swift repl
error: failed to launch REPL process: 'A' packet returned an error: 8
And that went away when I ran the container like this:
docker run --cap-add=SYS_PTRACE --security-opt seccomp=unconfined -it --name swiftfun swift /bin/bash
So, the swift docker image should be updated, right?