Software⏱️ 2 min read📅 2026-05-31

How to Fix: Ubuntu 20.04 upgrade, Python missing libffi.so.6

Ubuntu 20.04 upgrade issue with missing libffi.so.6, solution involves installing libffi-dev package.

Quick Answer: Install the libffi-dev package instead of libffi to resolve the error.

The error you're experiencing is due to the removal of libffi in Ubuntu 20.04, which was a dependency for some Python packages, including Numpy. The package was removed as part of the transition to Python 3.x.

💡 Why You Are Getting This Error

  • [Cause]

✅ Best Solutions to Fix It

Method 1: Reinstalling libffi

  1. Step 1: Run the following command to reinstall libffi:
sudo apt-get install -y libffi-dev

Method 2: Installing Python 3.x with libffi support

  1. Step 1: Run the following command to install Python 3.x:
sudo apt-get install python3

Method 2 (continued)

  1. Step 2: Run the following command to install pip and other Python packages with libffi support:
sudo apt-get install python3-pip

🎯 Final Words

By following these methods, you should be able to resolve the libffi.so.6 error and continue using Numpy in Python.

Did this fix your problem?

If not, try searching for specific error codes.

🔍 Search Error Database

❓ Frequently Asked Questions