centos安装pycurl出现src/module.c:723: error: ‘CURLPROTO_*’ undeclared错误的解决办法

0.问题

前几天试图在centos上按装pycurl,本以为已轻车熟路:pip install pycurl;
没想到却出现了一堆错误(只截取部分):

In file included from src/module.c:1:
src/pycurl.h:152:5: warning: #warning "libcurl was compiled with SSL support, but configure could not determine which " "library was used; thus no SSL crypto locking callbacks will be set, which may " "cause random crashes on SSL requests"
src/module.c: In function ‘initpycurl’:
src/module.c:723: error: ‘CURLPROTO_IMAP’ undeclared (first use in this function)
src/module.c:723: error: (Each undeclared identifier is reported only once
src/module.c:723: error: for each function it appears in.)
src/module.c:724: error: ‘CURLPROTO_IMAPS’ undeclared (first use in this function)
src/module.c:725: error: ‘CURLPROTO_POP3’ undeclared (first use in this function)src/module.c:726: error: ‘CURLPROTO_POP3S’ undeclared (first use in this function)
src/module.c:727: error: ‘CURLPROTO_SMTP’ undeclared (first use in this function)
src/module.c:728: error: ‘CURLPROTO_SMTPS’ undeclared (first use in this function)
src/module.c:729: error: ‘CURLPROTO_RTSP’ undeclared (first use in this function)src/module.c:730: error: ‘CURLPROTO_RTMP’ undeclared (first use in this function)
src/module.c:731: error: ‘CURLPROTO_RTMPT’ undeclared (first use in this function)
src/module.c:732: error: ‘CURLPROTO_RTMPE’ undeclared (first use in this function)
src/module.c:733: error: ‘CURLPROTO_RTMPTE’ undeclared (first use in this function)
src/module.c:734: error: ‘CURLPROTO_RTMPS’ undeclared (first use in this function)
src/module.c:735: error: ‘CURLPROTO_RTMPTS’ undeclared (first use in this function)
src/module.c:736: error: ‘CURLPROTO_GOPHER’ undeclared (first use in this function)
error: command 'gcc' failed with exit status 1

1.原因

尝试了其他方法也有类似问题。
折腾了半天,发现竟然是libcurl版本太低了,但是yum告诉我我已经安装了最新版本的libcurl。
然后还得出了一个结论,centos实在是太太保守了。所谓的最新居然是4年前的版本。

2.解决方法

知道了原因就好解决了。

Done


原文地址http://innlym.me/articles/1/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值