在R上安装curl和readr [英] install curl and readr on R

查看:204
本文介绍了在R上安装curl和readr的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

问候亲爱的社区。我尝试安装阅读器,但由于没有卷曲,这给了我一个错误。然后,我尝试安装curl,它要求另一个依赖项。我在命令提示符下验证了它,但看起来它已经安装了。任何的想法 ?看到打击:
非常感谢

Greeting dear community. I try to install readr but it gives me an error because of there is no curl. I then try to install curl and it asks for another dependency. I verify that in the command prompt but it looks like its already installed. Any idea ? See blow: Many Thanks

尝试安装阅读器:

> install.packages("readr")
Installing package into ‘/home/oracle/R/x86_64-unknown-linux-gnu-library/3.1’
(as ‘lib’ is unspecified)
also installing the dependency ‘curl’

trying URL 'http://cran.rstudio.com/src/contrib/curl_0.9.1.tar.gz'
Content type 'application/x-gzip' length 242408 bytes (236 Kb)
opened URL
==================================================
downloaded 236 Kb

trying URL 'http://cran.rstudio.com/src/contrib/readr_0.1.1.tar.gz'
Content type 'application/x-gzip' length 322890 bytes (315 Kb)
opened URL
==================================================
downloaded 315 Kb

* installing *source* package ‘curl’ ...
** package ‘curl’ successfully unpacked and MD5 sums checked
File curl.h not found. Make sure the curl development library is installed, e.g. libcurl4-openssl-dev (deb) or libcurl-devel (rpm).
ERROR: configuration failed for package ‘curl’
* removing ‘/home/oracle/R/x86_64-unknown-linux-gnu-library/3.1/curl’
Warning in install.packages :
  installation of package ‘curl’ had non-zero exit status
ERROR: dependency ‘curl’ is not available for package ‘readr’
* removing ‘/home/oracle/R/x86_64-unknown-linux-gnu-library/3.1/readr’
Warning in install.packages :
  installation of package ‘readr’ had non-zero exit status

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

尝试安装curl

Try to install curl

> install.packages("curl")
Installing package into ‘/home/oracle/R/x86_64-unknown-linux-gnu-library/3.1’
(as ‘lib’ is unspecified)
trying URL 'http://cran.rstudio.com/src/contrib/curl_0.9.1.tar.gz'
Content type 'application/x-gzip' length 242408 bytes (236 Kb)
opened URL
==================================================
downloaded 236 Kb

* installing *source* package ‘curl’ ...
** package ‘curl’ successfully unpacked and MD5 sums checked
File curl.h not found. Make sure the curl development library is installed, e.g. libcurl4-openssl-dev (deb) or libcurl-devel (rpm).
ERROR: configuration failed for package ‘curl’
* removing ‘/home/oracle/R/x86_64-unknown-linux-gnu-library/3.1/curl’
Warning in install.packages :
  installation of package ‘curl’ had non-zero exit status

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

在终端中安装curl:

Install curl in terminal:

[oracle@localhost data]$ sudo yum -y install curl
Loaded plugins: langpacks
Package curl-7.29.0-19.el7.x86_64 already installed and latest version
Nothing to do
[oracle@localhost data]$ sudo yum -y install libcurl
Loaded plugins: langpacks
Package libcurl-7.29.0-19.el7.x86_64 already installed and latest version
Nothing to do

好像libcurl在那儿?

It looks like libcurl is there ?

[oracle@localhost data]$ locate libcurl 
/home/oracle/anaconda/lib/libcurl.a
/home/oracle/anaconda/lib/libcurl.la
/home/oracle/anaconda/lib/libcurl.so
/home/oracle/anaconda/lib/libcurl.so.4
/home/oracle/anaconda/lib/libcurl.so.4.3.0
/home/oracle/anaconda/lib/pkgconfig/libcurl.pc
/home/oracle/anaconda/pkgs/curl-7.38.0-0/lib/libcurl.a
/home/oracle/anaconda/pkgs/curl-7.38.0-0/lib/libcurl.la
/home/oracle/anaconda/pkgs/curl-7.38.0-0/lib/libcurl.so
/home/oracle/anaconda/pkgs/curl-7.38.0-0/lib/libcurl.so.4
/home/oracle/anaconda/pkgs/curl-7.38.0-0/lib/libcurl.so.4.3.0
/home/oracle/anaconda/pkgs/curl-7.38.0-0/lib/pkgconfig/libcurl.pc
/usr/lib64/libcurl.so.4
/usr/lib64/libcurl.so.4.3.0

curl-config也在那里。.

So does the curl-config is there..

[oracle@localhost data]$ locate curl-config
/home/oracle/anaconda/bin/curl-config
/home/oracle/anaconda/pkgs/curl-7.38.0-0/bin/curl-config
[oracle@localhost data]$ 


推荐答案

我在 Ubuntu 14.04上解决了问题通过使用以下命令

sudo apt-get install libcurl4-openssl-dev

未来的用户可以使用以下命令搜索最新的libcurl:

apt-cache搜索libcurl

Future users can search for the latest libcurl using:
apt-cache search libcurl

这篇关于在R上安装curl和readr的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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