我正在关注下面的 jansson 教程。
https://github.com/akheron/jansson/blob/master/doc/tutorial.rst#id2
当我像教程一样编码时,我遇到了一个问题。
这个 jansson 的东西使用了curl库及其curl_easy_perform()方法
返回 1。
控制台打印如下,“不支持的协议(protocol)”。
我已经看到了一个解决方案(下面的链接),但我找不到任何像这样的额外空间。
cURL Error 1: Unsupported protocol: https
现在我对这个问题没有任何线索。
如果你有什么好的想法,请与我分享=)
最佳答案
从命令行运行:
$ curl-config --protocols | grep HTTPS
如果未打印 HTTPS
,则表明您链接到的 libcurl 版本尚未构建 SSL 支持。
在这种情况下,您必须在启用 SSL 支持的情况下重新安装它,例如 yum install libcurl-devel
应该可以解决问题。重新验证并重新构建示例代码。
关于curl:CentOS6 中不支持的协议(protocol)(https) - 与 jansson 相关,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16538150/