【问题标题】:Cannot reinstall or run Stringr package无法重新安装或运行 Stringr 包
【发布时间】:2021-08-04 01:08:06
【问题描述】:

我最近将 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

知道如何处理这个问题吗?

【问题讨论】:

    标签: r ubuntu stringr failed-installation


    【解决方案1】:

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

    require(stringr)
    

    【讨论】:

    • 嗯,感谢您的回复。我刚刚编辑了我的问题以反映我尝试这样做时会发生什么。这会导致错误,这就是我试图重新安装 Stringr 的原因。
    猜你喜欢
    • 2015-08-17
    • 2021-09-25
    • 1970-01-01
    • 2018-06-08
    • 1970-01-01
    • 1970-01-01
    • 2022-01-15
    • 2013-09-08
    • 2018-09-24
    相关资源
    最近更新 更多