【问题标题】:curl with ssl installed but compling R says libcurl find no https supportcurl 安装了 ssl 但编译 R 说 libcurl 找不到 https 支持
【发布时间】:2018-01-04 12:34:52
【问题描述】:

我安装了openssl,curl-7.57.0,选项--witt-ssl在centos6.4下启用https支持,设置

export CURL_CPPFLAGS=-I/usr/local/curl-7.57.0/include
export CURL_LIBS=-L/usr/local/curl-7.57.0/lib

并编译 R:

./configure --prefix=/usr/local/R-3.4.3 --enable-R-shlib

但是命令说 libcurl 不支持 https:

...
checking for curl-config... /usr/local/curl-7.57.0/bin/curl-config
checking libcurl version ... 7.57.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.22.0... yes
checking if libcurl supports https... no
configure: error: libcurl >= 7.22.0 library and headers are required with support for https

但是,命令curl-config --protocols 显示支持HTTPS:

DICT
FILE
FTP
FTPS
GOPHER
HTTP
HTTPS
IMAP
...

我参考了Installing R on Linux: configure: error: libcurl >= 7.28.0 library and headers are required with support for https并尝试安装libcurl4-openssl-dev,但似乎centos6.4没有这个lib。我该如何解决我的问题?

【问题讨论】:

标签: r curl


【解决方案1】:

最后我解决了这个问题。好像编译找不到对应的libssl.so所以失败了。以下将解决问题:

export PATH=/usr/local/bzip2-1.0.6/bin:$PATH
export PATH=/usr/local/xz-5.2.3/bin:$PATH
export PATH=/usr/local/zlib-1.2.11/bin:$PATH
export PATH=/usr/local/pcre-8.41/bin:$PATH
export PATH=/usr/local/curl-7.57.0/bin:$PATH
export PATH=/usr/local/openssl-1.1.0g/bin:$PATH  

export LD_LIBRARY_PATH=/usr/local/bzip2-1.0.6/lib:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=/usr/local/xz-5.2.3/lib:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=/usr/local/zlib-1.2.11/lib:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=/usr/local/pcre-8.41/lib:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=/usr/local/curl-7.57.0/lib:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=/usr/local/openssl-1.1.0g/lib:$LD_LIBRARY_PATH    

export CFLAGS="-I/usr/local/bzip2-1.0.6/include -I/usr/local/xz-5.2.3/include -I/usr/local/zlib-1.2.11/include -I/usr/local/pcre-8.41/include -I/usr/local/curl-7.57.0/include -I/usr/local/openssl-1.1.0g/include"
export LDFLAGS="-L/usr/local/bzip2-1.0.6/lib -L/usr/local/xz-5.2.3/lib -L/usr/local/zlib-1.2.11/lib -L/usr/local/pcre-8.41/lib -L/usr/local/curl-7.57.0/lib -L/usr/local/openssl-1.1.0g/lib"

【讨论】:

  • 您做得非常出色。我花了几天时间在 centos 6.9 中从源代码安装 R。在centos 7中它还不错。非常感谢。我在 /install/dep 中安装了所有依赖项,这使得导出的数量更少。
猜你喜欢
  • 1970-01-01
  • 2015-08-11
  • 2016-08-23
  • 2017-09-14
  • 2017-09-08
  • 2019-07-27
  • 2011-10-16
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多