在R中的谷歌计算引擎集群上安装libcurl

时间:2018-05-05 04:48:32

标签: r curl cluster-computing google-compute-engine httr

我在googlecomputeenginer包中设置了一个谷歌计算引擎集群。

每个节点都是r-base n1-standard VM,但在创建后与dplyr一起安装。

我需要能够在我的rbase节点上安装httr和curl包。

当我尝试安装" httr"或者" curl"我收到以下错误:

clusterEvalQ(cl, install.packages("curl"))



Using PKG_CFLAGS=
Using PKG_LIBS=-lcurl
------------------------- ANTICONF ERROR ---------------------------
Configuration failed because libcurl was not found. Try installing:
 * deb: libcurl4-openssl-dev (Debian, Ubuntu, etc)
 * rpm: libcurl-devel (Fedora, CentOS, RHEL)
 * csw: libcurl_dev (Solaris)
If libcurl is already installed, check that 'pkg-config' is in your
PATH and PKG_CONFIG_PATH contains a libcurl.pc file. If pkg-config
is unavailable you can set INCLUDE_DIR and LIB_DIR manually via:
R CMD INSTALL --configure-vars='INCLUDE_DIR=... LIB_DIR=...'
--------------------------------------------------------------------
ERROR: configuration failed for package ‘curl’
* removing ‘/usr/local/lib/R/site-library/curl’
Using PKG_CFLAGS=
Using PKG_LIBS=-lcurl
------------------------- ANTICONF ERROR ---------------------------
Configuration failed because libcurl was not found. Try installing:
 * deb: libcurl4-openssl-dev (Debian, Ubuntu, etc)
 * rpm: libcurl-devel (Fedora, CentOS, RHEL)
 * csw: libcurl_dev (Solaris)
If libcurl is already installed, check that 'pkg-config' is in your
PATH and PKG_CONFIG_PATH contains a libcurl.pc file. If pkg-config
is unavailable you can set INCLUDE_DIR and LIB_DIR manually via:
R CMD INSTALL --configure-vars='INCLUDE_DIR=... LIB_DIR=...'
--------------------------------------------------------------------
ERROR: configuration failed for package ‘curl’
* removing ‘/usr/local/lib/R/site-library/curl’
Using PKG_CFLAGS=
Using PKG_LIBS=-lcurl
------------------------- ANTICONF ERROR ---------------------------
Configuration failed because libcurl was not found. Try installing:
 * deb: libcurl4-openssl-dev (Debian, Ubuntu, etc)
 * rpm: libcurl-devel (Fedora, CentOS, RHEL)
 * csw: libcurl_dev (Solaris)
If libcurl is already installed, check that 'pkg-config' is in your
PATH and PKG_CONFIG_PATH contains a libcurl.pc file. If pkg-config
is unavailable you can set INCLUDE_DIR and LIB_DIR manually via:
R CMD INSTALL --configure-vars='INCLUDE_DIR=... LIB_DIR=...'
--------------------------------------------------------------------
ERROR: configuration failed for package ‘curl’
* removing ‘/usr/local/lib/R/site-library/curl’

有人可以帮我解决这个问题吗?我如何在整个集群中sudo-apt安装libcurl?

我试过了:

###Doesn't do anything but print the output
> clusterEvalQ(cl, "sudo apt-get install libcurl-openssl-dev")
[[1]]
[1] "sudo apt-get install libcurl-openssl-dev"

[[2]]
[1] "sudo apt-get install libcurl-openssl-dev"

[[3]]
[1] "sudo apt-get install libcurl-openssl-dev"

1 个答案:

答案 0 :(得分:1)

命令

sudo apt-get install libcurl-openssl-dev

不是R而是shell命令。如果在每台计算机上打开shell(命令提示符),则可以发出此命令。但是,有必要检查二进制包是否可用。这取决于使用的操作系统。