[英]Package ‘stringr’ was installed before R 4.0.0: please re-install it BiocManager Installation path not writeable, unable to update packages
得到错误Error: package 'stringr' was installed before R 4.0.0: please re-install it
and B iocManager Installation path not writeable, unable to update packages:
再往前走 rstudio 给了我
/usr/local/lib/R/lib/libR.so not found
在我的 Linux 盒子中从 R 3.6 升级到 4.0 时,我遇到了类似的问题。 我也在回答这个问题,因为这个问题是谷歌在寻找这个问题时给出的第一个结果之一。 事实证明,即使删除了 R (apt purge),系统中仍然存在一个文件夹,为将来的安装带来了很多问题。 我想链接这里给出的伟大答案并救了我: https://askubuntu.com/questions/1219737/installing-ggplot2-for-r-3-6-on-ubuntu-18-04
在 Linux 系统中,您应该查看:
$ ls /usr/local/lib/R/site-library
如果该文件夹有一个目录列表,您应该删除所有内容:
sudo rm -Rf /usr/local/lib/R/site-library
然后重新安装 R 和所有库。
这是关于如何修复这些错误的一个很长的答案,但我认为这是必要的,还包括提示和技巧(例如,现在(2020 年 7 月 25 日)不要安装 R 4.0.2)。 这给我带来了很大的痛苦,因为我在途中遇到了更多的错误。 Error: package 'stringr' was installed before R 4.0.0: please re-install it
和 B iocManager Installation path not writeable, unable to update packages:
我在我的主文件夹中删除了.RData(不可见,使用ls -la
)这解决了我在 R 4.0.0 错误之前安装的问题,但没有解决我的生物导体问题。 我认为如果您只有重新安装错误,它可能会起作用。
经过多次尝试让我的包加载但只收到这些错误后,我选择重新安装 R。 在 R 中,我运行了.libpaths
并删除了每个目录中的所有文件。 然后我通过从https://www.r-project.org/下载 R 重新安装了 R 并在下载的文件夹./configure --enable-R-shlib --with-blas --with-lapack
中运行了通用的编译命令。 make
sudo make install
。 rstudio 需要 --enable-R-shlib 才能使用 R,但其他则不需要。
2020 年 7 月 25 日,我尝试从 ubuntu 上的 apt 安装,但 rstudio 无法找到 libR.so( /usr/local/lib/R/lib/libR.so not found
的错误)。 我尝试使用./configure --enable-R-shlib
从源代码 R 4.0.2 进行编译,这应该会生成 libR.so,但这会返回错误。
I assume this to be an underlying problem as running ./configure --enable-R-shlib
compile from source with R 4.0.0, I got the files and Rstudio opened up (please fix R 4.0.2 and subsequently apt).
然后我跑了将军
if (!requireNamespace("BiocManager", quietly = TRUE))
install.packages("BiocManager")
BiocManager::install(version = "3.11")
安装 biocmanager,它终于奏效了。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.