首页 > 解决方案 > 我在 R 中安装 ConvergenceConcepts 包时遇到问题,它会抛出一条错误消息,指出“ConvergenceConcepts”的退出状态非零

问题描述

所以,我尝试在 RStudio 中安装一个包 ConvergenceConcepts,它给我带来了一条错误消息:

ERROR: lazy loading failed for package ‘ConvergenceConcepts’
* removing ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/ConvergenceConcepts’

和一个警告,包有非零退出状态。我该如何解决这个问题?

加载 ConvergenceConcepts 库时出错:

    Loading required package: tcltk
xcrun: error: active developer path ("/Library/Developer/CommandLineTools") does not exist
Use `sudo xcode-select --switch path/to/Xcode.app` to specify the Xcode that you wish to use for command line developer tools, or use `xcode-select --install` to install the standalone command line developer tools.
See `man xcode-select` for more details.
Error: package or namespace load failed for ‘tcltk’:
 .onLoad failed in loadNamespace() for 'tcltk', details:
  call: dyn.load(file, DLLpath = DLLpath, ...)
  error: unable to load shared object '/Library/Frameworks/R.framework/Versions/3.6/Resources/library/tcltk/libs/tcltk.so':
  dlopen(/Library/Frameworks/R.framework/Versions/3.6/Resources/library/tcltk/libs/tcltk.so, 10): Library not loaded: /opt/X11/lib/libX11.6.dylib
  Referenced from: /Library/Frameworks/R.framework/Versions/3.6/Resources/library/tcltk/libs/tcltk.so
  Reason: image not found
Error: package ‘tcltk’ could not be loaded
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/Resources/library/tcltk/libs//tcltk.so'' had status 1

尝试添加 tcltk 库时出错:

图书馆(tcltk)

xcrun: error: active developer path ("/Library/Developer/CommandLineTools") does not exist
Use `sudo xcode-select --switch path/to/Xcode.app` to specify the Xcode that you wish to use for command line developer tools, or use `xcode-select --install` to install the standalone command line developer tools.
See `man xcode-select` for more details.
Error: package or namespace load failed for ‘tcltk’:
 .onLoad failed in loadNamespace() for 'tcltk', details:
  call: dyn.load(file, DLLpath = DLLpath, ...)
  error: unable to load shared object '/Library/Frameworks/R.framework/Versions/3.6/Resources/library/tcltk/libs/tcltk.so':
  dlopen(/Library/Frameworks/R.framework/Versions/3.6/Resources/library/tcltk/libs/tcltk.so, 10): Library not loaded: /opt/X11/lib/libX11.6.dylib
  Referenced from: /Library/Frameworks/R.framework/Versions/3.6/Resources/library/tcltk/libs/tcltk.so
  Reason: image not found
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/Resources/library/tcltk/libs//tcltk.so'' had status 1

标签: r

解决方案


推荐阅读