R:安装包 UBUNTU 时出错 - dyn.load(file, DLLpath = DLLpath, ...) 中的错误:无法加载共享对象 [英] R: error installing packages UBUNTU - Error in dyn.load(file, DLLpath = DLLpath, ...) : unable to load shared object

查看:78
本文介绍了R:安装包 UBUNTU 时出错 - dyn.load(file, DLLpath = DLLpath, ...) 中的错误:无法加载共享对象的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在安装任何包时遇到问题,也来自包存档.在这种情况下,尝试安装 ggplot2 时显示错误:

* 安装 *source* 包 ‘ggplot2’ ...** 包 ‘ggplot2’ 成功解包并检查 MD5 总和** R** 数据*** 将数据集移动到延迟加载数据库** 安装** 为延迟加载准备包dyn.load(file, DLLpath = DLLpath, ...) 中的错误:无法加载共享对象/home/juanchi/R/x86_64-pc-linux-gnu-library/3.2/stringi/libs/stringi.so":libicui18n.so.52: no se puede abrir el archivo del objeto compartido: Noexiste el archivo o el Directorio错误:包ggplot2"的延迟加载失败* 删除‘/home/juanchi/R/x86_64-pc-linux-gnu-library/3.2/ggplot2’install.packages 中的警告:安装包ggplot2"的退出状态非零下载的源码包在‘/tmp/RtmpVU9aIn/downloaded_pa​​ckages’

这是我的会话信息

<代码>>会话信息()R 版本 3.2.2 (2015-08-14)平台:x86_64-pc-linux-gnu(64 位)运行于:Ubuntu 15.10语言环境:[1] LC_CTYPE=pt_BR.UTF-8 LC_NUMERIC=C LC_TIME=pt_BR.UTF-8[4] LC_COLLATE=es_ES.UTF-8 LC_MONETARY=pt_BR.UTF-8 LC_MESSAGES=es_ES.UTF-8[7] LC_PAPER=pt_BR.UTF-8 LC_NAME=C LC_ADDRESS=C[10] LC_TELEPHONE=C LC_MEASUREMENT=pt_BR.UTF-8 LC_IDENTIFICATION=C附带的基础包:[1] stats graphics grDevices utils datasets 方法基础通过命名空间加载(而不是附加):[1] rsconnect_0.4.1.4 工具_3.2.2

提前致谢!!

解决方案

您升级到 Ubuntu 15.10 意味着 ICU 库从版本 52 升级到更新版本(如果我记得是 55).但是 stringi 包是针对 52 构建的,现在已损坏.当您的 R 包在 Ubuntu 包管理系统之外时,可能会发生这种情况.

所以你需要重新安装ggp​​lot2需要的stringi,然后ggplot2就会安装并加载,避免你出错

您可以通过使用预构建版本的 ggplot2 及其依赖项来避免这些升级问题:do sudo apt-get install r-cran-ggplot2.>

I'm having problem installing any package, also from package archive. In this case showing error trying to install ggplot2:

* installing *source* package ‘ggplot2’ ...
** package ‘ggplot2’ successfully unpacked and MD5 sums checked
** R
** data
*** moving datasets to lazyload DB
** inst
** preparing package for lazy loading
Error in dyn.load(file, DLLpath = DLLpath, ...) : 
  unable to load shared object '/home/juanchi/R/x86_64-pc-linux-gnu-library/3.2/stringi/libs/stringi.so':
  libicui18n.so.52: no se puede abrir el archivo del objeto compartido: No existe el archivo o el directorio
ERROR: lazy loading failed for package ‘ggplot2’
* removing ‘/home/juanchi/R/x86_64-pc-linux-gnu-library/3.2/ggplot2’
Warning in install.packages :
  installation of package ‘ggplot2’ had non-zero exit status

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

This is my session Info

> sessionInfo()
R version 3.2.2 (2015-08-14)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 15.10

locale:
 [1] LC_CTYPE=pt_BR.UTF-8       LC_NUMERIC=C               LC_TIME=pt_BR.UTF-8       
 [4] LC_COLLATE=es_ES.UTF-8     LC_MONETARY=pt_BR.UTF-8    LC_MESSAGES=es_ES.UTF-8   
 [7] LC_PAPER=pt_BR.UTF-8       LC_NAME=C                  LC_ADDRESS=C              
[10] LC_TELEPHONE=C             LC_MEASUREMENT=pt_BR.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

loaded via a namespace (and not attached):
[1] rsconnect_0.4.1.4 tools_3.2.2     

Thanks in advance!!

解决方案

Your upgrade to Ubuntu 15.10 meant that the ICU library went from version 52 to a newer version (55, if I recall). But the stringi package was built against 52, and is now broken. That can happen to your R packages when they are outside of the Ubuntu package management system.

So you need to re-install stringi, which is required by ggplot2, and then ggplot2 will install and also load, avoiding the erorr you.

You could avoid these upgrade problems by using the pre-built versions of ggplot2 and its dependencies: do sudo apt-get install r-cran-ggplot2.

这篇关于R:安装包 UBUNTU 时出错 - dyn.load(file, DLLpath = DLLpath, ...) 中的错误:无法加载共享对象的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆