r - 无法重新安装或运行 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, 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
我尝试使用重新安装 stringrinstall.packages("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)
推荐阅读
- key-bindings - 是否可以使用 `Ctrl-x Ctrl-s` 键绑定在 nano 编辑器中保存和退出文件?
- node.js - 将 Couchnode 作为 ESM 导入会出现错误“[错误]:JSDoc '@augments' 未附加到类。”
- python - 如何在 dockerfile 多阶段复制可执行文件
- python-3.x - file.open() 以无限循环结束
- java - 为什么我在使用 rs.getInt(1) 时没有获得行 ID?
- javascript - 在 JS 数组映射中反应集合变量
- ssis - SSIS onError 事件处理程序,可以通过 C# 脚本触发另一个事件
- c# - WFP - 重用 DataGrid 列和资源
- node.js - 有没有办法在 VS CODE 中完全使用 twilio 进行开发?
- wpf - WPF Datagrid 组排序