2017-09-19 65 views
0

我使用Ubuntu 16.04和Python 2.7.12。安裝pycurl'致命錯誤:gnutls/gnutls.h:沒有這樣的文件或目錄'

當我嘗試用pip安裝pycurl時,可以看到下面的日誌。

[email protected]:~/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. 

如何在上面的日誌中安裝pycurl?

回答

1

安裝GNUTLS首先使用:

sudo apt-get install libgnutls28-dev 

然後再試一次。

1

我自己找到了答案。

需要像下面第一個那樣安裝libgnutls28-dev。

sudo apt-get install libgnutls28-dev 
相關問題