Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Installing pycurl with 'fatal error: gnutls/gnutls.h: No such file or directory'

I use ubuntu 16.04 and python 2.7.12.

When I try to install pycurl with pip, I could see below log.

aaa@bbb:~/git/ccc$ sudo pip install pycurl
  Downloading pycurl-7.43.0.tar.gz (182kB)
    100% |████████████████████████████████| 184kB 515kB/s 
Installing collected packages: pycurl
  Running setup.py install for pycurl ... error

...

    In file included from src/docstrings.c:4:0:
    src/pycurl.h:173:30: fatal error: gnutls/gnutls.h: No such file or directory
    compilation terminated.

How to install pycurl with above log?

like image 436
xoska74 Avatar asked Sep 19 '17 01:09

xoska74


2 Answers

Install gnutls first using:

sudo apt-get install libgnutls28-dev

Then try again.

like image 51
Kyle Higginson Avatar answered Sep 27 '22 21:09

Kyle Higginson


I found the answer by myself.

Need to install libgnutls28-dev like below first.

sudo apt-get install libgnutls28-dev
like image 25
xoska74 Avatar answered Sep 27 '22 20:09

xoska74