Pip ffi.h Gcc Error


pip is a tool used to install Python modules from a central python repository. While using pip command there may be some error like ffi.h gcc .This error will look like below.

#include <ffi.h> 
                     ^ 
    compilation terminated. 
    error: command 'gcc' failed with exit status 1

Install libffi-dev

This problem is related to the libffi libraries. If libffi development libraries are not installed we will get this error. To solve the issue install libffi-dev on Debian/Ubuntu, libffi-devel on Redhat/Centos/Fedora.

Solve For Ubuntu, Debian, Mint, Kali

We will install libffi-dev package in deb based distributions.

$ sudo apt install libffi-dev
Solve For Ubuntu, Debian, Mint, Kali
Solve For Ubuntu, Debian, Mint, Kali

Solve For Fedora, CentOS, RedHat

We will install libff-devel package in rpm based distributions.

$ sudo dnf install libffi-devel -y
Solve For Fedora, CentOS, RedHat
Solve For Fedora, CentOS, RedHat

 

Pip ffi.h Gcc Error Infografic

Pip ffi.h Gcc Error Infografic
Pip ffi.h Gcc Error Infografic

 

LEARN MORE  How To Install and Use OpenSSL Library In Python Applications?

Leave a Comment