简体   繁体   English

错误:XLConnect 的 package 或命名空间加载失败

[英]Error: package or namespace load failed for XLConnect

I'm installing XLConnect library in R studio but, unable to do so.我正在 R 工作室中安装 XLConnect 库,但无法这样做。

I know that this package has java dependency and my R software and java both are 64 bit.我知道这个 package 具有 java 依赖项,而我的 R 软件和 Z93F725A44863D21C863 都是 F725A44863 位。 Also, both have configured correctly.此外,两者都已正确配置。 I have also installed rJava package before installing XLConnect.在安装 XLConnect 之前,我还安装了 rJava package。 This package was working properly but, now I'm getting this error.这个 package 工作正常,但现在我收到了这个错误。

library(XLConnect)

ERROR: package or namespace load failed for'XLconnect':错误:package 或“XLconnect”的命名空间加载失败:
.onload failed in loadNamespace() for XLConnect, details: .onload 在 XLConnect 的 loadNamespace() 中失败,详细信息:
Call.称呼。 System2("cat",c("/etc/*-release"), stdout =TRUE, stderr = TRUE) error: ' "cat" not found. System2("cat",c("/etc/*-release"), stdout =TRUE, stderr = TRUE) 错误:' "cat" not found。

Please help me.请帮我。

This worked for me: install prior version until they fix this at CRAN:这对我有用:安装以前的版本,直到他们在 CRAN 解决这个问题:

require(devtools)
install_version("XLConnect", version = "1.0.2", repos = "http://cran.us.r-project.org")

https://github.com/miraisolutions/xlconnect/issues/132 also recommends: https://github.com/miraisolutions/xlconnect/issues/132还推荐:

install.packages("XLConnect", type="source", INSTALL_opts = c("--no-multiarch"))

If still relevant, adding rtools to "path" (system environment variable) worked for me.如果仍然相关,将rtools添加到“路径”(系统环境变量)对我有用。

XLConnect is still required to read xlsx-files that were created with SAP's business intelligence tool. XLConnect 仍然需要读取使用 SAP 的商业智能工具创建的 xlsx 文件。 These Excel files appear empty for readxl and openxlsx.对于 readxl 和 openxlsx,这些 Excel 文件显示为空。

Along with the above solutions, I had to use this line of code to make it work properly.除了上述解决方案外,我还必须使用这行代码才能使其正常工作。

sys.setenv(XLCONNECT_JAVA_Repo_URL='https://jcenter.bintray.com')

I have been new to R, and faced this challenge.我是 R 的新手,面临着这个挑战。 After incorporating all the above recommendations, this is what worked for me (Windows user):在合并上述所有建议后,这对我有用(Windows 用户):

  1. install.packages("devtools")安装包(“开发工具”)

  2. install_version("XLConnect", version = "1.0.1", repos = "http://cran.us.r-project.org") install_version("XLConnect", version = "1.0.1", repos = "http://cran.us.r-project.org")

  3. After you load JGR library (if that's your preferred GUI), then you can check the default option of XLconnect under package manager.加载 JGR 库(如果这是您首选的 GUI)后,您可以在 package 管理器下检查 XLconnect 的默认选项。

Thanks for your contribution.感谢您的贡献。

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

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