如何解决无法重新安装或运行 Stringr 包
我最近将 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,...):
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,...): 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)
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。