gpt4 book ai didi

r - 无法在 CentOS 上的 R 中安装 XML 包

转载 作者:太空宇宙 更新时间:2023-11-03 17:13:03 25 4
gpt4 key购买 nike

当我尝试在 CENTOS 上的 R 中安装 xml 包时,我收到这样的警告:

> 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’

>

我的 session 信息是:

> 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/archivist@d5305be)
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)

可能是R版本的问题?

最佳答案

输出中明确指出了两个问题:

  1. 第一个是警告,您可能需要删除 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. 第二个是一个错误,你的交易破坏者 -- 你没有安装了 libxml2-dev(或 CentOS 称之为的任何东西):
checking for xml2-config... no
Cannot find xml2-config

如果没有 libxml2-dev 提供的 XML 开发工具,您根本无法从源代码构建包。

关于r - 无法在 CentOS 上的 R 中安装 XML 包,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29014062/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com