配置失败,因为找不到libcurl [英] Configuration failed because libcurl was not found

查看:1286
本文介绍了配置失败,因为找不到libcurl的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用 fromJSON 从远程服务器中提取一些json数据:

I am trying to pull some json data from a remote server using fromJSON:

> server <- 'http://111.111.000.00:3000'
> streams <- fromJSON(paste(server, '/output/streams', sep=""), flatten=TRUE)

结果:

Error: Required package curl not found. 
Please run: install.packages('curl')

所以我尝试安装:

> install.packages("curl")
Installing package into ‘/home/lauxxx/R/x86_64-pc-linux-gnu-library/3.3’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/src/contrib/curl_2.3.tar.gz'
Content type 'application/x-gzip' length 400460 bytes (391 KB)
==================================================
downloaded 391 KB

* installing *source* package ‘curl’ ...
** package ‘curl’ successfully unpacked and MD5 sums checked
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 ‘/home/lauxxx/R/x86_64-pc-linux-gnu-library/3.3/curl’
Warning in install.packages :
  installation of package ‘curl’ had non-zero exit status

The downloaded source packages are in
    ‘/tmp/RtmpdoavNf/downloaded_packages’

然后我尝试安装 libcurl4 -openssl-dev

> install.packages("libcurl4-openssl-dev")
Installing package into ‘/home/lau/R/x86_64-pc-linux-gnu-library/3.3’
(as ‘lib’ is unspecified)
Warning in install.packages :
  package ‘libcurl4-openssl-dev’ is not available (for R version 3.3.1)

为什么?怎么了?我该如何解决?

Why? What is going wrong? How can I fix it?

当我使用Xubuntu 16.04时还可以。但是现在我正在使用Kubuntu 16.10。

It was ok when I was on Xubuntu 16.04. But now I am on Kubuntu 16.10.

有什么想法吗?

推荐答案

libcurl4-openssl-dev 不是R包,而是linux库。

libcurl4-openssl-dev is not a R package, but rather a linux library.

在控制台类型:

sudo apt-get install libcurl4-openssl-dev

注意:,您需要 sudo 次幂。

这篇关于配置失败,因为找不到libcurl的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆