Unable to install XML package in R on CentOS

Marcin Kosiński

When I try to install xml package in R on CENTOS i recieve such warning:

> install.packages("XML")
Installing package into ‘/opt/wpusers/r-mkosinski/R/x86_64-redhat-linux-gnu-library/3.1’
(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... /usr/bin/sed
checking for pkg-config... /bin/pkg-config
checking for xml2-config... no
Cannot find xml2-config
ERROR: configuration failed for package ‘XML’
* removing ‘/opt/wpusers/r-mkosinski/R/x86_64-redhat-linux-gnu-library/3.1/XML’
Warning in install.packages :
  installation of package ‘XML’ had non-zero exit status

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

>

My session info is:

> session_info()
Session info --------------------------------------------------------------------
 setting  value                       
 version  R version 3.1.2 (2014-10-31)
 system   x86_64, linux-gnu           
 ui       RStudio (0.98.1091)         
 language (EN)                        
 collate  en_US.UTF-8                 
 tz       Europe/Warsaw               

Packages ------------------------------------------------------------------------
 package    * version   date       source                            
 archivist    1.2       2015-02-12 Github (pbiecek/[email protected])
 assertthat * 0.1       2013-12-06 CRAN (R 3.1.2)                    
 bitops     * 1.0-6     2013-08-17 CRAN (R 3.1.2)                    
 DBI          0.3.1     2014-09-24 CRAN (R 3.1.2)                    
 devtools     1.7.0     2015-01-17 CRAN (R 3.1.2)                    
 digest     * 0.6.8     2014-12-31 CRAN (R 3.1.2)                    
 dplyr        0.4.0     2015-01-08 CRAN (R 3.1.2)                    
 htmltools  * 0.2.6     2014-09-08 CRAN (R 3.1.2)                    
 httpuv     * 1.3.2     2014-10-23 CRAN (R 3.1.2)                    
 httr       * 0.6.1     2015-01-01 CRAN (R 3.1.2)                    
 lubridate    1.3.3     2013-12-31 CRAN (R 3.1.2)                    
 magrittr   * 1.5       2014-11-22 CRAN (R 3.1.2)                    
 memoise    * 0.2.1     2014-04-22 CRAN (R 3.1.2)                    
 mime       * 0.2       2014-09-26 CRAN (R 3.1.2)                    
 pbapply      1.1-1     2014-05-16 CRAN (R 3.1.2)                    
 plyr       * 1.8.1     2014-02-26 CRAN (R 3.1.2)                    
 R6         * 2.0.1     2014-10-29 CRAN (R 3.1.2)                    
 Rcpp       * 0.11.3    2014-09-29 CRAN (R 3.1.2)                    
 RCurl      * 1.95-4.5  2014-12-28 CRAN (R 3.1.2)                    
 RJSONIO    * 1.3-0     2014-07-28 CRAN (R 3.1.2)                    
 RSQLite      1.0.0     2014-10-25 CRAN (R 3.1.2)                    
 rstudio    * 0.98.1091 2015-01-19 local                             
 rstudioapi * 0.2       2014-12-31 CRAN (R 3.1.2)                    
 shiny        0.10.2.2  2014-12-08 CRAN (R 3.1.2)                    
 stringi      0.4-1     2014-12-14 CRAN (R 3.1.2)                    
 stringr    * 0.6.2     2012-12-06 CRAN (R 3.1.2)                    
 xtable     * 1.7-4     2014-09-12 CRAN (R 3.1.2) 

Maybe it is a matter of R version?

Dirk Eddelbuettel

You have two problems clearly stated in the output:

  1. The first is a warning, you may want to remove a.out/:
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
  1. The second is an error and your dealbreaker -- you do not have libxml2-dev (or whatever CentOS calls this) installed:
checking for xml2-config... no
Cannot find xml2-config

Without the XML development tools provided by libxml2-dev you simply cannot build the package from source.

本文收集自互联网,转载请注明来源。

如有侵权,请联系[email protected] 删除。

编辑于
0

我来说两句

0条评论
登录后参与评论

相关文章

来自分类Dev

R快速XML解析

来自分类Dev

无法在CentOS的R中安装XML软件包

来自分类Dev

在R中解析XML

来自分类Dev

ACTION_INSTALL_PACKAGE

来自分类Dev

R tm package and cyrillic text

来自分类Dev

Install only one package from package.json?

来自分类Dev

Install Mercurial and TortoiseHG on CentOS 6.5

来自分类Dev

无法在centos R中安装rJava

来自分类Dev

How to install sendmail in CentOS?

来自分类Dev

package.json与“ npm install%s -g”

来自分类Dev

CentOS 6.5 R安装依赖性

来自分类Dev

VIM Unable to install plugins

来自分类Dev

Unable install webconsole in ServiceMix 4.5.3

来自分类Dev

Eclipse unable to install Genymotion Plugin Issue

来自分类Dev

Unable to install cachem package for R

来自分类Dev

Trouble installing an R package using R CMD install

来自分类Dev

Install local dist package into virtualenv

来自分类Dev

Unable to install scala on phusion/baseimage

来自分类Dev

“ npm install [package]”不会更新package.json

来自分类Dev

'pip install <package>'和'python -m pip install <package>'有什么区别?

来自分类Dev

npm install无法读取package.json

来自分类Dev

CentOS 7无法在“ yum install”操作期间分配内存

来自分类Dev

package.json与“ npm install%s -g”

来自分类Dev

Install SVN 1.8 on Centos 7

来自分类Dev

'yum install“ *”'是个坏主意吗?(CentOS 7)

来自分类Dev

R:install.package()未在CentOS 6.5上调用编译器

来自分类Dev

Centos Live Install百胜

来自分类Dev

Centos 6.3 R 安装错误

来自分类Dev

Is there any way to install a transient package?