我在我的Ubuntu机器13.10上安装XML和RCurl时遇到了一些问题.我今天执行了所有sudo更新和升级.

我正在try 将Crattle用于R.我无法安装使用Crattle所需的"XML".这与一年后被问到的right here个问题几乎相同,而且是一个不同的操作系统.以下是我收到的错误消息:

> install.packages("RCurl")
Installing package into ‘/home/steven/R/x86_64-pc-linux-gnu-library/3.0’
(as ‘lib’ is unspecified)
trying URL 'http://cran.rstudio.com/src/contrib/RCurl_1.95-4.1.tar.gz'
Content type 'application/x-gzip' length 870915 bytes (850 Kb)
opened URL
==================================================
downloaded 850 Kb

* installing *source* package ‘RCurl’ ...
** package ‘RCurl’ successfully unpacked and MD5 sums checked
checking for curl-config... no
Cannot find curl-config
ERROR: configuration failed for package ‘RCurl’
* removing ‘/home/steven/R/x86_64-pc-linux-gnu-library/3.0/RCurl’
Warning in install.packages :
  installation of package ‘RCurl’ had non-zero exit status

The downloaded source packages are in
    ‘/tmp/RtmpUwBkbS/downloaded_packages’
> install.packages("XML")
Installing package into ‘/home/steven/R/x86_64-pc-linux-gnu-library/3.0’
(as ‘lib’ is unspecified)
trying URL 'http://cran.rstudio.com/src/contrib/XML_3.98-1.1.tar.gz'
Content type 'application/x-gzip' length 1582216 bytes (1.5 Mb)
opened URL
==================================================
downloaded 1.5 Mb

* installing *source* package ‘XML’ ...
** package ‘XML’ successfully unpacked and MD5 sums checked
checking for gcc... gcc
checking for C compiler default output file name... 
rm: cannot remove 'a.out.dSYM': Is a directory
a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... 
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -E
checking for sed... /bin/sed
checking for pkg-config... /usr/bin/pkg-config
checking for xml2-config... no
Cannot find xml2-config
ERROR: configuration failed for package ‘XML’
* removing ‘/home/steven/R/x86_64-pc-linux-gnu-library/3.0/XML’
Warning in install.packages :
  installation of package ‘XML’ had non-zero exit status

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

不太确定如何从这里开始.

推荐答案

在Ubuntu上安装curl和xml.跑

sudo apt-get install libcurl4-openssl-dev libxml2-dev

R中的package install上的错误消息表明curl和xml库不存在或找不到.

R相关问答推荐

如何判断R中一列的值是否在所有其他列中重复?

从字符载体创建函数参数

插入指示行之间时间间隔的新行

如何使用Cicerone指南了解R Shiny中传单 map 的元素?

有没有方法将琴弦完全捕捉到R中的多边形?

在数据表中呈现数学符号

提取R中值和列名的所有可能组合

gganimate在使用shadow_mark选项时不保留所有过go 的标记

如何使下一个按钮只出现在Rshiny 的一段时间后?""

IMF IFS数据以R表示

从外部文件读取多个值作为字符向量

使用Facet_WRAP时更改框图中线的 colored颜色

R Select()可以测试不存在的子集列

使用R中的dist()迭代ID匹配的欧几里德距离

R -在先前group_by级别汇总时获取最大大小子组的计数

以不同于绘图中元素的方式对GG图图例进行排序

在散点图中使用geom_point放置线图例

SHILINY中DT列的条件着色

数据集上的R循环和存储模型系数

需要一个函数来在第一行创建一个新变量,然后用新变量替换一个不同的变量(对于多行)