gpt4 book ai didi

r - 无法重新安装或运行 Stringr 包

转载 作者:行者123 更新时间:2023-12-04 18:43:04 24 4
gpt4 key购买 nike

我最近将 ubuntu 从 18.04 升级到 20.04,所以这可能是相关的......
我的代码要求我拥有 stringr 包并使用 tidyverse。当我尝试运行 require(stringr)library(tidyverse)我收到这些错误,

> require(stringr) # String manipulation
Loading required package: stringr
Error: package or namespace load failed for ‘stringr’ in dyn.load(file, DLLpath = DLLpath, ...):
unable to load shared object '/home/elrodlab/R/x86_64-pc-linux-gnu-library/3.6/stringi/libs/stringi.so':
libicui18n.so.60: cannot open shared object file: No such file or directory
> library(tidyverse)
Error: package or namespace load failed for ‘tidyverse’ in dyn.load(file, DLLpath = DLLpath, ...):
unable to load shared object '/home/elrodlab/R/x86_64-pc-linux-gnu-library/3.6/stringi/libs/stringi.so':
libicui18n.so.60: cannot open shared object file: No such file or directory
我尝试使用 install.packages("stringr") 重新安装 stringr但然后得到
Installing package into ‘/home/elrodlab/R/x86_64-pc-linux-gnu-library/3.6’
(as ‘lib’ is unspecified)
trying URL 'https://cloud.r-project.org/src/contrib/stringr_1.4.0.tar.gz'
Content type 'application/x-gzip' length 135777 bytes (132 KB)
==================================================
downloaded 132 KB

* installing *source* package ‘stringr’ ...
** package ‘stringr’ successfully unpacked and MD5 sums checked
mv: cannot move '/home/elrodlab/R/x86_64-pc-linux-gnu-library/3.6/stringr' to '/home/elrodlab/R/x86_64-pc-linux-gnu-library/3.6/00LOCK-stringr/stringr': Permission denied
ERROR: cannot remove earlier installation, is it in use?
* removing ‘/home/elrodlab/R/x86_64-pc-linux-gnu-library/3.6/stringr’
Warning in install.packages :
installation of package ‘stringr’ had non-zero exit status

The downloaded source packages are in
‘/tmp/RtmptRvgMm/downloaded_packages’
尽管似乎 Stringr 很好用,但当我尝试使用 require(stringr) 时我最终得到了这个错误

Loading required package: stringr Error: package or namespace load failed for ‘stringr’ in dyn.load(file, DLLpath = DLLpath, ...): unable to load shared object '/home/elrodlab/R/x86_64-pc-linux-gnu-library/3.6/stringi/libs/stringi.so': libicui18n.so.60: cannot open shared object file: No such file or directory


关于如何处理这个的任何想法?

最佳答案

第二条消息似乎表明 stringr 实际上已成功安装。再次尝试运行

require(stringr)

关于r - 无法重新安装或运行 Stringr 包,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/67524486/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com