I am trying to pull some json data from a remote server using fromJSON
:
我正在尝试使用fromJSON从远程服务器提取一些json数据:
> server <- 'http://111.111.000.00:3000'> streams <- fromJSON(paste(server, '/output/streams', sep=""), flatten=TRUE)
Result:
结果:
Error: Required package curl not found. Please run: install.packages('curl')
So I tried to install it:
所以我试着安装它:
> 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 checkedUsing 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 yourPATH and PKG_CONFIG_PATH contains a libcurl.pc file. If pkg-configis 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 statusThe downloaded source packages are in ‘/tmp/RtmpdoavNf/downloaded_packages’
Then I tried to install libcurl4-openssl-dev
:
然后我尝试安装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?
为什么?什么错了吗?我怎样才能修好它呢?
It was ok when I was on Xubuntu 16.04. But now I am on Kubuntu 16.10.
当我使用Xubuntu 16.04时,一切正常。但现在我是Kubuntu的16.10。
Any ideas?
什么好主意吗?
2 个解决方案
#1
16
libcurl4-openssl-dev
is not a R package, but rather a linux library.
libcurl4-openssl-dev不是一个R包,而是一个linux库。
In a console type:
在控制台类型:
sudo apt-get install libcurl4-openssl-dev
Note: you need sudo powers.
注意:你需要超能力。
#2
3
The Linux release is: CentOS Linux release 7.3.1611 (Core)
Linux发行版是:CentOS Linux发行版7.3.1611(核心)
In my case, I was trying to install R package: devtools
在我的例子中,我尝试安装R包:devtools。
------------------------- 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 yourPATH and PKG_CONFIG_PATH contains a libcurl.pc file. If pkg-configis unavailable you can set INCLUDE_DIR and LIB_DIR manually via:R CMD INSTALL --configure-vars='INCLUDE_DIR=... LIB_DIR=...'
I checked $PATH
, 'pkg-config' was in the PATH. But there is no libcurl.pc file in PKG_CONFIG_PATH (/usr/local/lib/pkgconfig/)
.
我检查了$PATH,“pkg-config”在路径中。但是没有libcurl。PKG_CONFIG_PATH中的pc文件(/usr/local/lib/pkgconfig/)。
Here is how I solved the problem.
我是这样解决这个问题的。
suwget https://github.com/curl/curl/releases/download/curl-7_55_0/curl-7.55.0.tar.gz./configuremake make install
After this, I saw libcurl.pc file in PKG_CONFIG_PATH (/usr/local/lib/pkgconfig/
).
之后,我看到了libcurl。PKG_CONFIG_PATH中的pc文件(/usr/local/lib/pkgconfig/)。
#1
16
libcurl4-openssl-dev
is not a R package, but rather a linux library.
libcurl4-openssl-dev不是一个R包,而是一个linux库。
In a console type:
在控制台类型:
sudo apt-get install libcurl4-openssl-dev
Note: you need sudo powers.
注意:你需要超能力。
#2
3
The Linux release is: CentOS Linux release 7.3.1611 (Core)
Linux发行版是:CentOS Linux发行版7.3.1611(核心)
In my case, I was trying to install R package: devtools
在我的例子中,我尝试安装R包:devtools。
------------------------- 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 yourPATH and PKG_CONFIG_PATH contains a libcurl.pc file. If pkg-configis unavailable you can set INCLUDE_DIR and LIB_DIR manually via:R CMD INSTALL --configure-vars='INCLUDE_DIR=... LIB_DIR=...'
I checked $PATH
, 'pkg-config' was in the PATH. But there is no libcurl.pc file in PKG_CONFIG_PATH (/usr/local/lib/pkgconfig/)
.
我检查了$PATH,“pkg-config”在路径中。但是没有libcurl。PKG_CONFIG_PATH中的pc文件(/usr/local/lib/pkgconfig/)。
Here is how I solved the problem.
我是这样解决这个问题的。
suwget https://github.com/curl/curl/releases/download/curl-7_55_0/curl-7.55.0.tar.gz./configuremake make install
After this, I saw libcurl.pc file in PKG_CONFIG_PATH (/usr/local/lib/pkgconfig/
).
之后,我看到了libcurl。PKG_CONFIG_PATH中的pc文件(/usr/local/lib/pkgconfig/)。