For some reason, pyenv is failing to install any versions of python due to an issue with libffi. I have all the libraries installed, yet I get:
*** WARNING: renaming "_ctypes" since importing it failed: libffi.so.8: cannot open shared object file: No such file or directory
The curious thing is libffi is installed, but it's a different version:
❯ find /usr -name '*ffi.so*'
/usr/lib/x86_64-linux-gnu/libffi.so
/usr/lib/x86_64-linux-gnu/libffi.so.7
/usr/lib/x86_64-linux-gnu/libffi.so.7.1.0
So, the build is trying libffi.so.8 even though libffi.so.7 is installed.
Can anybody explain how debian-based systems choose the version of the shared library? I've checked the .h and .pc files, but nothing jumps out at me showing why it would be referencing version 8.
❯ ldconfig -p | grep libffi.so
libffi.so.7 (libc6,x86-64) => /lib/x86_64-linux-gnu/libffi.so.7
libffi.so.7 (libc6) => /lib/i386-linux-gnu/libffi.so.7
libffi.so (libc6,x86-64) => /lib/x86_64-linux-gnu/libffi.so
Additional note: I notice libffi is also installed by homebrew. However, it's the same version as Mint has installed, so it's not a conflict (as far as I can tell).
Any suggestions?
❯ uname -a
Linux mcrowe-XPS-15-9560 5.4.0-90-generic #101-Ubuntu SMP Fri Oct 15 20:00:55 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
❯ cat /etc/lsb-release
DISTRIB_ID=LinuxMint
DISTRIB_RELEASE=20.2
DISTRIB_CODENAME=uma
DISTRIB_DESCRIPTION="Linux Mint 20.2 Uma"