R:dyn.load中的错误(文件,DLLpath = DLLpath,...) [英] R: Error in dyn.load(file, DLLpath = DLLpath, ...)

查看:1093
本文介绍了R:dyn.load中的错误(文件,DLLpath = DLLpath,...)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我现在已经在办公室的台式电脑的R项目上工作了一段时间,但在旅行时需要随身携带脚本。我将所有内容复制到笔记本电脑中,并对代码进行了一些更改。唉,在尝试编译时(按照我在台式计算机中使用的完全相同的过程),出现以下错误:

  $ R CMD INSTALL --no-multiarch --with-keep.source coala 
*安装到库'/home/my_pc/R/x86_64-pc-linux-gnu-library/3.3'
*安装* source * package'coala'...
** libs
make:没有什么可以为`all'完成的。
安装到/home/my_pc/R/x86_64-pc-linux-gnu-library/3.3/coala/libs
** R
** inst
**准备软件包用于延迟加载
**帮助
***安装帮助索引
**构建包索引
**安装短片
**测试是否可以加载已安装的包
dyn.load中的错误(文件,DLLpath = DLLpath,...):
无法加载共享对象'/home/my_pc/R/x86_64-pc-linux-gnu-library/3.3/ coala / libs / coala.so':
/home/my_pc/R/x86_64-pc-linux-gnu-library/3.3/coala/libs/coala.so:undefined symbol:_ZSt24__throw_out_of_range_fmtPKcz
错误:加载失败
执行暂停
错误:加载失败
*删除'/home/my_pc/R/x86_64-pc-linux-gnu-library/3.3/coala'
*恢复以前'/home/my_pc/R/x86_64-pc-linux-gnu-library/3.3/coala'



<两台电脑都有相同的Ubuntu,但R版本不同。另外,我不得不提及,我在两个库中同时工作,并且伴随的库更新没有问题,这使得此错误消息更令人困惑。我检查了可能与此问题有关的答案,但无法弄清楚如何应用他们的解决方案: $ b R:安装软件包时出错UBUNTU - dyn.load文件错误(文件,DLLpath = DLLpath,.. 。):无法加载共享对象
有消息无法加载共享对象stats.so当R启动



有没有办法解决这个问题?这可能是原因?什么是未定义符号 _ZSt24__throw_out_of_range_fmtPKcz

解决方案

什么是给你作为输出吗?

我今天使用最新的更新遇到同样的问题( R 3.3.1 for MacOS X )。更新后,我的R安装似乎崩溃了。我的解决方案是简单地从文件系统中删除lib目录并重新安装R:

  rm -rf / Users / johann / Library /R/3.3/library 
sudo rm -rf Library / Frameworks / R.framework / Versions / 3.3 / Resources / library

希望这有助于......


I have worked now for some time on an R project in my office's desktop computer, but need to carry the scripts with me while on travel. I copied everything into my laptop and did some changes to the code. Alas, when trying to compile (following the exact same procedure I was using in my desktop computer), the following error:

$ R CMD INSTALL --no-multiarch --with-keep.source coala
* installing to library ‘/home/my_pc/R/x86_64-pc-linux-gnu-library/3.3’
* installing *source* package ‘coala’ ...
** libs
make: Nothing to be done for `all'.
installing to /home/my_pc/R/x86_64-pc-linux-gnu-library/3.3/coala/libs
** R
** inst
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded
Error in dyn.load(file, DLLpath = DLLpath, ...) : 
unable to load shared object '/home/my_pc/R/x86_64-pc-linux-gnu-library/3.3/coala/libs/coala.so':
/home/my_pc/R/x86_64-pc-linux-gnu-library/3.3/coala/libs/coala.so: undefined symbol: _ZSt24__throw_out_of_range_fmtPKcz
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/home/my_pc/R/x86_64-pc-linux-gnu-library/3.3/coala’
* restoring previous ‘/home/my_pc/R/x86_64-pc-linux-gnu-library/3.3/coala’

Both computers have the same Ubuntu but different R version. Also, I have to mention that I am working in two libraries at the same time and that the accompanying library update without problems, which makes this error message more puzzling. I have checked answers that may be related to this question, but can't figure out how to apply their solutions:

R: error installing packages UBUNTU - Error in dyn.load(file, DLLpath = DLLpath, ...) : unable to load shared object Got message unable to load shared object stats.so when R starts

Is there a way to solve this problem? Which may be the cause? What is the undefined symbol _ZSt24__throw_out_of_range_fmtPKcz?

解决方案

What is .libPaths() giving you as the output?

I encountered the same problem using the latest update today (R 3.3.1 for MacOS X). My R installation seemed to crash after updating it. My solution was simply to remove the lib directories from the file system and reinstall R:

rm -rf /Users/johann/Library/R/3.3/library
sudo rm -rf Library/Frameworks/R.framework/Versions/3.3/Resources/library

Hope this helps...

这篇关于R:dyn.load中的错误(文件,DLLpath = DLLpath,...)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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