无法安装ggp​​lot2:“library.dynam(lib,package,package.lib)中的错误:找不到共享对象’stringi.so’”

前端之家收集整理的这篇文章主要介绍了无法安装ggp​​lot2:“library.dynam(lib,package,package.lib)中的错误:找不到共享对象’stringi.so’”前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
上周我从Ubuntu 14.04升级到14.10.自从更新以来我第一次尝试在RStudio中使用ggplot,我的ggplot包中出现了依赖性错误,并且不再注册为已安装(之前工作正常).当我尝试重新安装ggp​​lot2时:
install.packages("ggplot2",dep=TRUE)

尝试安装依赖项时安装失败.这是输出尾部的样子:

* installing *source* package ‘stringr’ ...
** package ‘stringr’ successfully unpacked and MD5 sums checked
** R
** inst
** preparing package for lazy loading
Error in library.dynam(lib,package,package.lib) : 
  shared object ‘stringi.so’ not found
ERROR: lazy loading Failed for package ‘stringr’
* removing ‘/home/james/R/x86_64-pc-linux-gnu-library/3.1/stringr’
Warning in install.packages :
  installation of package ‘stringr’ had non-zero exit status
ERROR: dependency ‘stringr’ is not available for package ‘reshape2’
* removing ‘/home/james/R/x86_64-pc-linux-gnu-library/3.1/reshape2’
Warning in install.packages :
  installation of package ‘reshape2’ had non-zero exit status
ERROR: dependency ‘reshape2’ is not available for package ‘ggplot2’
* removing ‘/home/james/R/x86_64-pc-linux-gnu-library/3.1/ggplot2’
Warning in install.packages :
  installation of package ‘ggplot2’ had non-zero exit status

The downloaded source packages are in
    ‘/tmp/RtmpWNyAha/downloaded_packages’

我有一种感觉这就是我应该看的线(下面),但我不知道如何解释这个错误,有人对我有什么建议吗?我真的不知道从哪里开始,因为我发现任何其他人都遇到了和我一样的错误.

Error in library.dynam(lib,package.lib) : 
  shared object ‘stringi.so’ not found

不确定我做的Ubuntu升级是否与此有关…但我想我会提到它以防万一.

在@Nick Kennedey的评论之后,我尝试像这样安装stringi:
> install.packages("stringi",dep=TRUE)

这导致了我之前没见过的错误

2015-08-07 10:26:35 (256 KB/s) - ‘/tmp/RtmpQI4Uau/downloaded_packages/stringi_0.5-5.tar.gz’ saved [3639183/3639183]

ERROR: Failed to lock directory ‘/home/james/R/x86_64-pc-linux-gnu-library/3.1’ for modifying
Try removing ‘/home/james/R/x86_64-pc-linux-gnu-library/3.1/00LOCK-stringi’
Warning in install.packages :
  installation of package ‘stringi’ had non-zero exit status

The downloaded source packages are in
    ‘/tmp/RtmpQI4Uau/downloaded_packages’
> install.packages("stringi",dep=TRUE)

所以我按照错误中的建议删除了LOCK文件夹.

在终端:rm -r /home/james/R/x86_64-pc-linux-gnu-library/3.1/00LOCK-stringi’

然后尝试再次安装stringi包,它工作了!这就是问题……现在我刚刚完成安装,没有任何问题.

我仍然有点困惑……至于这个错误是如何产生的.关于是什么导致这一点的任何想法,以便我将来可以避免它?这可能是我最近升级到14.10的症状吗?

原文链接:https://www.f2er.com/ubuntu/347482.html

猜你在找的Ubuntu相关文章