[英]Package 'xxx’ was installed before R 4.0.0: please re-install it (already done fresh install and checked lib paths)
I am having some issue with installing a package in R 4.0.2 from binaries.我在从二进制文件安装 R 4.0.2 中的软件包时遇到了一些问题。 Here is my attempt:
这是我的尝试:
> install.packages("C:/Users/MNestor/Downloads/libSBML_5.18.0.zip", repos = NULL, type = "win.binary")
Installing package into ‘C:/Users/MNestor/Documents/R/win-library/4.0’ (as ‘lib’ is unspecified)
package ‘libSBML’ successfully unpacked and MD5 sums checked
Warning messages:
1: multiple methods tables found for ‘type’
2: multiple methods tables found for ‘type<-’
Next I load library:接下来我加载库:
> library('libSBML')
Error: package or namespace load failed for ‘libSBML’:
package ‘libSBML’ was installed before R 4.0.0: please re-install it
This error is confusing to me because I am working in R 4.0.2 and have clearly just done a fresh install.这个错误让我感到困惑,因为我在 R 4.0.2 中工作并且显然刚刚完成了全新安装。
I have tried我试过了
remove.packages('libSBML')
and reinstallingremove.packages('libSBML')
并重新安装For reference here are my library directories:作为参考,这里是我的库目录:
> .libPaths()
[1] "C:/Users/MNestor/Documents/R/win-library/4.0"
[2] "C:/Program Files/R/R-4.0.2/library"
The libSMBL
folder is located in the first library path, and not the second (as expected). libSMBL
文件夹位于第一个库路径中,而不是第二个(如预期的那样)。
Here is session info:这是会话信息:
> sessionInfo()
R version 4.0.2 (2020-06-22)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 17134)
Matrix products: default
locale:
[1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C
[5] LC_TIME=English_United States.1252
attached base packages:
[1] parallel stats graphics grDevices utils datasets methods base
other attached packages:
[1] rsbml_2.46.0 BiocGenerics_0.34.0
loaded via a namespace (and not attached):
[1] BiocManager_1.30.10 compiler_4.0.2 tools_4.0.2 remotes_2.2.0
[5] stats4_4.0.2 SBMLR_1.84.0 graph_1.66.0
The error message is maybe a bit confusing, but it's saying the package is already compiled for an earlier version of R. (That's what the option "win.binary" means).错误消息可能有点令人困惑,但它表示该包已经为早期版本的 R 编译。(这就是选项“win.binary”的意思)。
R 4.0 and earlier binaries are not compatible because of updated compilers and build tools.由于更新的编译器和构建工具,R 4.0 和更早的二进制文件不兼容。
You'll need to install the package from source, which likely means installing R tools ( https://cran.r-project.org/bin/windows/Rtools/ ) or you'll need to use a version that is pre-built for R 4.0 or later.您需要从源代码安装软件包,这可能意味着安装 R 工具( https://cran.r-project.org/bin/windows/Rtools/ ),或者您需要使用预安装的版本为 R 4.0 或更高版本构建。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.