微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

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

如何解决在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 举报,一经查实,本站将立刻删除。