配置:错误:libcurl >= 7.28.0 库和标头需要支持 https

配置:错误:libcurl >= 7.28.0 库和标头需要支持 https

您好,我在尝试配置 R 安装时遇到了问题。基本上,我试图遵循我的之前的安装过程,(由于某种原因,我需要在CentOS6而不是CentOS5中重新安装相同的R)

./configure --prefix=$HOME/Programme/R-3.3.2 --enable-R-shlib LDFLAGS="-L/$HOME/Programme/zlib-1.2.11/lib -L/$HOME/Programme/ bzip2-1.0.6/lib -L/$HOME/Programme/xz-5.2.3/lib -L/$HOME/Programme/pcre-8.40/lib -L/$HOME/Programme/curl-7.47.1/lib " CPPFLAGS="-I/$HOME/Programme/zlib-1.2.11/include -I/$HOME/Programme/bzip2-1.0.6/include -I/$HOME/Programme/xz-5.2.3/include - I/$HOME/Programme/pcre-8.40/include -I/$HOME/Programme/curl-7.47.1/include"

配置退出,因为:

...
checking for curl-config... /u32/myusername/Programme/curl-7.52.1/bin//curl-config
checking libcurl version ... 7.52.1
checking curl/curl.h usability... yes
checking curl/curl.h presence... yes
checking for curl/curl.h... yes
checking if libcurl is version 7 and >= 7.28.0... yes
checking if libcurl supports https... no
configure: error: libcurl >= 7.28.0 library and headers are required with support for https

注意到有人使用了“7.47.1”,它似乎对他/她有用,所以安装了“7.47.1”,但它不起作用。 http://pj.freefaculty.org/blog/?p=315

checking for curl-config... /u32/myusername/Programme/curl-7.47.1/bin//curl-config
checking libcurl version ... 7.47.1
checking curl/curl.h usability... yes
checking curl/curl.h presence... yes
checking for curl/curl.h... yes
checking if libcurl is version 7 and >= 7.28.0... yes
checking if libcurl supports https... no
configure: error: libcurl >= 7.28.0 library and headers are required with support for https

注意到有人建议安装“libcurl-devel”./config 返回 libcurl 错误 所以我下载了:ftp://fr2.rpmfind.net/linux/centos/6.8/os/x86_64/Packages/libcurl-devel-7.19.7-52.el6.x86_64.rpm 安装并为其设置 PATH。

checking for curl-config... /u32/myusername/Programme/libcurl-devel/usr/bin/curl-config
checking libcurl version ... 7.19.7
checking curl/curl.h usability... yes
checking curl/curl.h presence... yes
checking for curl/curl.h... yes
checking if libcurl is version 7 and >= 7.28.0... yes
checking if libcurl supports https... no
configure: error: libcurl >= 7.28.0 library and headers are required with support for https

注意到“正在检查 libcurl 版本...7.19.7”我推测“libcurl-devel”可能太旧了。所以我安装了“libcurl-devel-7.29.0-35.el7.centos.x86_64.rpm”(这是针对CentOS7的,我找不到CentOS6版本)

checking for curl-config... /u32/myusername/Programme/libcurl_devel/usr/bin//curl-config
checking libcurl version ... 7.29.0
checking curl/curl.h usability... yes
checking curl/curl.h presence... yes
checking for curl/curl.h... yes
checking if libcurl is version 7 and >= 7.28.0... yes
checking if libcurl supports https... no
configure: error: libcurl >= 7.28.0 library and headers are required with support for https

有什么建议吗?

答案1

由于某种原因被否决的另一个答案是完全正确的:.configure将生成一个日志文件config.log,它将显示测试的详细信息checking if libcurl supports https(很可能是通过尝试编译给定的程序)。

查看此日志文件,查明您的版本是否libcurl确实不支持http,或者是否存在其他问题(例如缺少/错误的库或包含路径,或错误的库顺序,或您的gcc变体出现问题,或更改在图书馆)。在后一种情况下,configure.in可以通过在现有选项中添加更多选项,或者更改库的顺序,或者使用不同的 gcc 版本来解决问题,可能是在或等效的情况下。

在前一种情况下,由于您是libcurl自己编译的,因此请确保其配置正确并且支持 https。

我在自编译东西时多次做过类似的事情。

您找不到这方面的“官方来源”,这只是基本的开发技术。通过查看日志文件,您可以轻松地确信该文件包含更详细的信息。有点冗长,搜索checking if libcurl字符串即可查看重要部分。

在不知道出了什么问题的情况下随机安装不同版本的库是没有帮助的。

答案2

我有和你类似的问题。真正的错误消息位于您的 config.log 文件中。找出并尝试解决它。就我而言,我更改了 gcc 的另一个版本来解决该问题。

相关内容