简体   繁体   English

Package 'stringr' 在 R 4.0.0 之前安装:请重新安装 BiocManager 安装路径不可写,无法更新软件包

[英]Package ‘stringr’ was installed before R 4.0.0: please re-install it BiocManager Installation path not writeable, unable to update packages

Got the errors 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:得到错误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:

and further down the road rstudio gave me再往前走 rstudio 给了我

/usr/local/lib/R/lib/libR.so not found

I had a similar problem when upgrading from R 3.6 to 4.0 in my Linux box.在我的 Linux 盒子中从 R 3.6 升级到 4.0 时,我遇到了类似的问题。 I am also answering this because this question is one of the first results google gives when looking for this problem.我也在回答这个问题,因为这个问题是谷歌在寻找这个问题时给出的第一个结果之一。 It turns out that, even by removing R (apt purge) there is a folder that remains in the system creating a lot of problems for the future installation.事实证明,即使删除了 R (apt purge),系统中仍然存在一个文件夹,为将来的安装带来了很多问题。 I want to link the GREAT answer that was given here and saved me: https://askubuntu.com/questions/1219737/installing-ggplot2-for-r-3-6-on-ubuntu-18-04我想链接这里给出的伟大答案并救了我: https://askubuntu.com/questions/1219737/installing-ggplot2-for-r-3-6-on-ubuntu-18-04

In Linux systems you should look in:在 Linux 系统中,您应该查看:

$ ls /usr/local/lib/R/site-library

If the folder has a list of directories you should remove everything with:如果该文件夹有一个目录列表,您应该删除所有内容:

sudo rm -Rf /usr/local/lib/R/site-library

Then reinstall R and all the libraries.然后重新安装 R 和所有库。

This is a long answer to how to fix these errors but I assume necessary and also tips and tricks included (eg don't install R 4.0.2 right now (Jul 25, 2020)).这是关于如何修复这些错误的一个很长的答案,但我认为这是必要的,还包括提示和技巧(例如,现在(2020 年 7 月 25 日)不要安装 R 4.0.2)。 It caused me a lot of pain because there were many more errors that I ran into on the way.这给我带来了很大的痛苦,因为我在途中遇到了更多的错误。 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: Error: package 'stringr' was installed before R 4.0.0: please re-install it和 B iocManager Installation path not writeable, unable to update packages:

I removed.RData in my home folder (invisible, use ls -la ) This fixed my problem for the installed before R 4.0.0 error, but did not fix my bioconductor problems.我在我的主文件夹中删除了.RData(不可见,使用ls -la )这解决了我在 R 4.0.0 错误之前安装的问题,但没有解决我的生物导体问题。 I assume it might work if you only had the re-install error.我认为如果您只有重新安装错误,它可能会起作用。

After many attempts at trying to get my packages to load but only getting these errors, I opted to reinstall R.经过多次尝试让我的包加载但只收到这些错误后,我选择重新安装 R。 In R, I ran .libpaths and deleted all the files in each of the directories.在 R 中,我运行了.libpaths并删除了每个目录中的所有文件。 I then reinstalled R by downloading R from https://www.r-project.org/ and ran the general compile commands in the downloaded folder ./configure --enable-R-shlib --with-blas --with-lapack make sudo make install .然后我通过从https://www.r-project.org/下载 R 重新安装了 R 并在下载的文件夹./configure --enable-R-shlib --with-blas --with-lapack中运行了通用的编译命令。 make sudo make install The --enable-R-shlib is needed for rstudio to be able to use R, but the others aren't. rstudio 需要 --enable-R-shlib 才能使用 R,但其他则不需要。

On Jul 25, 2020 I tried to install from apt on ubuntu, but rstudio was not able to find libR.so (error of /usr/local/lib/R/lib/libR.so not found ). 2020 年 7 月 25 日,我尝试从 ubuntu 上的 apt 安装,但 rstudio 无法找到 libR.so( /usr/local/lib/R/lib/libR.so not found的错误)。 I tried to compile from source R 4.0.2 with the ./configure --enable-R-shlib which should make the libR.so but this returned an error.我尝试使用./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). 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).

I then ran the general然后我跑了将军

if (!requireNamespace("BiocManager", quietly = TRUE))
  install.packages("BiocManager")
BiocManager::install(version = "3.11")

to install biocmanager and it finally worked.安装 biocmanager,它终于奏效了。

暂无
暂无

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

相关问题 Package R 4.0.0之前安装了'XXX':请重新安装 - Package ‘XXX’ was installed before R 4.0.0: please re-install it R:“mxnet”的命名空间加载失败:package“mxnet”是在 R 4.0.0 之前安装的:请重新安装它 - R: namespace load failed for ‘mxnet’: package ‘mxnet’ was installed before R 4.0.0: please re-install it 错误:“ggplot2”的包或命名空间加载失败:包“ggplot2”是在 R 4.0.0 之前安装的:请重新安装执行停止 - Error: package or namespace load failed for 'ggplot2': package 'ggplot2' was installed before R 4.0.0: please re-install it Execution halted 在 R 4.0.0 之前安装了包“xxx”:请重新安装(已经完成全新安装并检查了 lib 路径) - Package 'xxx’ was installed before R 4.0.0: please re-install it (already done fresh install and checked lib paths) 失败并发生错误:R 3.0.0之前已构建“包'sentiment':请重新安装” - Failed with error: ‘package ‘sentiment’ was built before R 3.0.0: please re-install it’ R中“错误:包'_____'是在3.0.0之前构建的:请重新安装”的原因 - Causes of “Error: package '_____' was built before 3.0.0: please re-install it” in R 错误:包'dmGWAS'是在R 3.0.0之前构建的:请重新安装它 - Error: package ‘dmGWAS’ was built before R 3.0.0: please re-install it 如何重新安装修改后的R程序包 - How to re-install a modified R package 安装路径不可写R,无法更新包 - installation path not writable R, unable to update packages 在 R 4.0.0 中安装 Bioconductor 包 - Install Bioconductor Packages in R 4.0.0
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM