Package libffi was not found in the pkg-config search path REDHAT6.5

前端 未结 6 1003
甜味超标
甜味超标 2020-12-31 09:37

I am trying to run setup.py related to a proprietary software installation and it has dependencies on libffi.

Since its Redhat 6.5 the python version was 2.6 and i i

相关标签:
6条回答
  • 2020-12-31 09:58

    You will need the development version of libffi to install libraries which depends on libffi :

    sudo yum install libffi-devel
    

    This worked for me

    0 讨论(0)
  • 2020-12-31 10:01

    try after installing:

    sudo apt-get install libffi6 libffi-dev
    
    0 讨论(0)
  • 2020-12-31 10:11

    Faced a similar issue while installing paramiko using pip3:

    $ pip3 install paramiko

    ERROR:

    Package libffi was not found in the pkg-config search path. Perhaps you should add the directory containing `libffi.pc' to the PKG_CONFIG_PATH environment variable No package 'libffi' found

    No package 'libffi' found c/_cffi_backend.c:15:17: fatal error: ffi.h: No such file or directory compilation terminated.

    distutils.errors.DistutilsExecError: command 'x86_64-linux-gnu-gcc' failed with exit status 1

    RESOLUTION:

    $ sudo apt-get install libffi-dev
    $ pip3 install paramiko
    

    Successfully installed asn1crypto bcrypt cffi cryptography-1.2.3 paramiko-1.16.0 pycparser pynacl six-1.10.0

    0 讨论(0)
  • 2020-12-31 10:13

    try this

    sudo apt-get install -y python3-cffi

    0 讨论(0)
  • 2020-12-31 10:17

    I was using python 3.8 and getting the same error while wheel was trying to setup cffi on a conda environment. I tried installing libffi and libffi-dev (and exiting the terminal and reactivating the environment each time was installing something!) but with no luck. I then thought that maybe downgrading python to 3.7 might solve the issue. I did that in my conda environment (just activated the environment and ran conda install python=3.7 and then all of the sudden libffi was found! wheel was able to setup cffi and all were working like a charm!

    0 讨论(0)
  • 2020-12-31 10:19

    I had the same issue for MacOS. I assume the solution should be similar.

    nano ~/.bash_profile
    

    Add these two lines below to the end of your bash_profile so that it can be discovered

    export PKG_CONFIG_PATH="/usr/local/opt/libffi/lib/pkgconfig"
    export LDFLAGS="-L/usr/local/opt/libffi/lib" 
    

    Save and quit and restart Terminal

    0 讨论(0)
提交回复
热议问题