在Mac上的R中加载summarytools时出错

问题描述

我尝试以不同的方式安装summarytools,但是在使用library(summarytools)时仍然出现此错误

这是我得到的错误

 library(summarytools)
Registered S3 method overwritten by 'pryr':
  method      from
  print.bytes Rcpp
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 ‘summarytools’:
 .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

提前谢谢!

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)