When running pydev debugger on eclipse, it errors out about missing shared libraries namely libffi and libssl, although both are installed
>locate libffi.so.7
/usr/lib/x86_64-linux-gnu/libffi.so.7
"/home/user1/.var/app/org.eclipse.Java/eclipse/plugins/org.python.pydev.core_10.2.1.202307021217/pysrc/_pydevd_bundle/pydevd_utils.py", line 9, in <module>
import ctypes
File "/home/user1/.pyenv/versions/3.11.5/lib/python3.11/ctypes/__init__.py", line 8, in <module>
from _ctypes import Union, Structure, Array
ImportError: libffi.so.7: cannot open shared object file: No such file or directory
Adding LD_LIBRARY_PATH to run/debug configurations does not solve the problem set: LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu
Setting the correct LD_LIBRARY_PATH is the correct solution however, in the environment tab in the run configurations, there are 2 options in the end, default is 'append environment to native environment'
The second option is: 'Replace native environment with specified environment'
Choosing to replace (2nd option), solves the problem and the libraries are loaded correctly
Happy Debugging :)