I recently upgraded my OS to Ubuntu 20.04 LTS.
Now when I try to import a library like Numpy in Python, I get the following error:
ImportError: libffi.so.6
I am using Xubuntu 20.04 and recompiling the python version 3.7 did not work for me.
The way I solved this was to download the 19.10 version of the package from here: http://mirrors.kernel.org/ubuntu/pool/main/libf/libffi/libffi6_3.2.1-8_amd64.deb
and then installing it
sudo apt install ./libffi6_3.2.1-8_amd64.deb
This will unpack the libffi.so.6
and libffi.so.6.0.4
files to /usr/lib/x86_64-linux-gnu/
. The libffi.so.6
file is just a link to libffi.so.6.0.4
in the same directory.
As far as I could see this does not overwrite any files so should be safe.
Hopefully this helps someone as well.