简体   繁体   English

“包或命名空间加载失败”加载错误 R package “litteR”

[英]"package or namespace load failed" error in loading R package "litteR"

i am getting the following error whenever i try to load the package "litteR".每当我尝试加载 package“litteR”时,我都会收到以下错误。 I have updated all my packages and dont have this problem with any other ones我已经更新了我所有的包,其他包都没有这个问题

library(litteR) xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun Error: package or namespace load failed for 'litteR': .onLoad failed in loadNamespace() for 'tcltk', details: call: dyn.load(file, DLLpath = DLLpath, ...) error: unable to load shared object '/Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/library/tcltk/libs/tcltk.so': dlopen(/Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/library/tcltk/libs/tcltk.so, 0x000A): Library not loaded: /opt/X11/lib/libX11.6.dylib Referenced from: /Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/library/tcltk/libs/tcltk.so Reason: tried: '/opt/X11/lib/libX11.6.dylib' (no such file), '/usr/lib/libX11.6.dylib' (no such file) In addition: Warning message: In system2("/usr/bin/otool", c("-L", shQuote(DSO)), stdout = TRUE): running command ''/usr/bin/otool' -L '/Library/Frameworks/R.framework/Resou库(litteR)xcrun:错误:无效的活动开发人员路径(/Library/Developer/CommandLineTools),缺少 xcrun:/Library/Developer/CommandLineTools/usr/bin/xcrun 错误:package 或“litteR”的命名空间加载失败:。 onLoad 在“tcltk”的 loadNamespace() 中失败,详细信息:调用:dyn.load(file, DLLpath = DLLpath, ...) 错误:无法加载共享 object '/Library/Frameworks/R.framework/Versions/4.1- arm64/Resources/library/tcltk/libs/tcltk.so': dlopen(/Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/library/tcltk/libs/tcltk.so, 0x000A): 库未加载:/opt/X11/lib/libX11.6.dylib 引用自:/Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/library/tcltk/libs/tcltk.so 原因:试过:'/opt/ X11/lib/libX11.6.dylib' (no such file), '/usr/lib/libX11.6.dylib' (no such file) 另外: Warning message: In system2("/usr/bin/otool" , c("-L", shQuote(DSO)), stdout = TRUE: 运行命令 ''/usr/bin/otool' -L '/Library/Frameworks/R.framework/Resou rces/library/tcltk/libs//tcltk.so'' had status 1 rces/library/tcltk/libs//tcltk.so'' 的状态为 1

im not sure why this is happening, i have a macbook pro, not sure if this makes a difference我不确定为什么会这样,我有一台 macbook pro,不确定这是否会有所不同

You need to install the commando line tools.您需要安装命令行工具。 Open the Terminal.app and run the following line xcode-select --install打开 Terminal.app 并运行以下行xcode-select --install

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM