Skip to content

Instantly share code, notes, and snippets.

@ifduyue
Last active August 19, 2023 00:17
Show Gist options
  • Star 14 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save ifduyue/ccc644f146657ccb9e60f0af676f1923 to your computer and use it in GitHub Desktop.
Save ifduyue/ccc644f146657ccb9e60f0af676f1923 to your computer and use it in GitHub Desktop.
Resolve pycurl: libcurl link-time ssl backend (nss) is different from compile-time ssl backend (openssl)
# yum
There was a problem importing one of the Python modules
required to run yum. The error leading to this problem was:

   pycurl: libcurl link-time ssl backend (nss) is different from compile-time ssl backend (openssl)

Please install a package which provides this module, or
verify that the module is installed correctly.

It's possible that the above module doesn't match the
current version of Python, which is:
2.7.5 (default, Nov  6 2016, 00:28:07)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-11)]

If you cannot solve this problem yourself, please go to
the yum faq at:
  http://yum.baseurl.org/wiki/Faq

Fix

pip uninstall pycurl
export PYCURL_SSL_LIBRARY=nss
pip install --compile --install-option="--with-nss" --no-cache-dir pycurl

More Info

http://pycurl.io/docs/latest/install.html#ssl

@chrisgode
Copy link

Got the same error and tryed everythink but only this command worked fine for me on a rhel env. Thanks!

@luckmoon
Copy link

Thanks a lot!!!!

@madalozzo
Copy link

Thanks!!!

@mslee89
Copy link

mslee89 commented Nov 19, 2018

Thanks a lot 👍

@ijjorama
Copy link

Thanks, got me out of a tight spot!

@Hassan-Qureshi
Copy link

Thanks, man. After the struggle of two days. Thanks a lot. (Y)

@snack0verflow
Copy link

ERROR: Cannot uninstall 'pycurl'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.

@freedomlang
Copy link

This script worked for me! Thanks a lot 👍

@BoWuGit
Copy link

BoWuGit commented Feb 15, 2020

Thanks very much!

@vigneshragupathy
Copy link

It worked , Thanks!

@gMan1990
Copy link

gMan1990 commented Jun 4, 2020

ImportError: pycurl: libcurl link-time ssl backend (nss) is different from compile-time ssl backend (none/other)

UserWarning: Disabling all use of wheels due to the use of --build-options / --global-options / --install-options.
  cmdoptions.check_install_build_global(options)

@Green-li
Copy link

Green-li commented Jul 9, 2020

I find many approaches, but only this works! Thanks!!!

@flying-falcon
Copy link

Does it work for python3

@flying-falcon
Copy link

flying-falcon commented Jul 31, 2020

Same steps worked on py3. Thanks!

@j4hangir
Copy link

j4hangir commented Feb 4, 2021

👍 worked

@noneorone
Copy link

thanks! worked+1

@fran-expertice
Copy link

Worked!!!

@pmreyes2
Copy link

pmreyes2 commented Jul 7, 2022

This worked!

@bpineda
Copy link

bpineda commented Aug 19, 2023

This might be wrong but it worked for me: I used "--config-settings --with-nns=1". That did the trick for me on CentOS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment