简体   繁体   English

无法将 XML package 安装到 Rstudio

[英]Unable to install XML package to Rstudio

I'm trying to install XML Package to Rstudio Using the ribbon: Tools--> Install Packages --> Packages: to type XML, but the dropdown list opend had only this packages: xml2, XML2R, xml2relational, xmlparsedata, xmlr, xmlrpc2. I'm trying to install XML Package to Rstudio Using the ribbon: Tools--> Install Packages --> Packages: to type XML, but the dropdown list opend had only this packages: xml2, XML2R, xml2relational, xmlparsedata, xmlr, xmlrpc2 .

Next, I tried:接下来,我尝试了:

install.packages("XML")

but received the warning:但收到警告:

WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding:

https://cran.rstudio.com/bin/windows/Rtools/
Installing package into ‘D:/BCDD/Documents/R/win-library/3.6’
(as ‘lib’ is unspecified)
Warning in install.packages :
  package ‘XML’ is not available (for R version 3.6.3)

So I followed the link above: https://cran.rstudio.com/bin/windows/Rtools/ and using these questions:所以我按照上面的链接: https://cran.rstudio.com/bin/windows/Rtools/并使用这些问题:

  1. Why can't I install the XML package 为什么我不能安装 XML package
  2. Cannot install package XML to R 无法将 package XML 安装到 R

Then tried然后试了

install.packages("XML", repos = "http://www.omegahat.net/R",type="source")

but received the same warning and more:但收到了同样的警告和更多:

WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding:

https://cran.rstudio.com/bin/windows/Rtools/
Installing package into ‘D:/BCDD/Documents/R/win-library/3.6’
(as ‘lib’ is unspecified)
trying URL 'http://www.omegahat.net/R/src/contrib/XML_3.99-0.tar.gz'
Content type 'application/x-gzip' length 1547930 bytes (1.5 MB)
downloaded 1.5 MB

* installing *source* package 'XML' ...
** using staged installation
Please define LIB_XML (and LIB_ZLIB, LIB_ICONV)
ERROR: configuration failed for package 'XML'
* removing 'D:/BCDD/Documents/R/win-library/3.6/XML'
Warning in install.packages :
  installation of package ‘XML’ had non-zero exit status

The downloaded source packages are in
    ‘C:\Users\BCDD\AppData\Local\Temp\RtmpAhAYpl\downloaded_packages’

Any help to how to install the package XML will be appreciated任何有关如何安装 package XML 的帮助将不胜感激

You can download the version you want from here: https://cran.rstudio.com//src/contrib/Archive/XML/你可以从这里下载你想要的版本: https://cran.rstudio.com//src/contrib/Archive/XML/

According to their GitHub repo, version 3.99-0.3 should work for you, I can't try it out coz I have R4.0 and I can install only the most recent [3.99-0.5].根据他们的 GitHub repo,版本 3.99-0.3 应该适合你,我无法尝试,因为我有 R4.0,我只能安装最新的 [3.99-0.5]。

Alternatively, when you choose the version you want and run on your R console:或者,当您选择所需的版本并在 R 控制台上运行时:

devtools::install_version("XML", version = "3.99-0.3") # or the version you want

Have a try.试试。 Let me know.让我知道。

Check this RStudio Support post which covers how to install older versions of packages.检查此RStudio 支持帖子,其中介绍了如何安装旧版本的软件包。

Be sure to install rtools35 from the archive请务必从存档安装 rtools35

Going to R 4.0.2 is not a particularly bad idea at this point.在这一点上,转到 R 4.0.2 并不是一个特别糟糕的主意。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM