Rstudio按照包失败

library(swirl)
Error: package or namespace load failed for ‘swirl’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]):
 there is no package called ‘bitops’
> install.packages("bitops")

  There is a binary version available but the source version is later:
       binary source needs_compilation
bitops  1.0-6  1.0-7              TRUE

Do you want to install from sources the package which needs compilation? (Yes/no/cancel) 
installing the source package ‘bitops’

trying URL 'https://mirrors.e-ducation.cn/CRAN/src/contrib/bitops_1.0-7.tar.gz'
Content type 'application/x-gzip' length 10809 bytes (10 KB)
==================================================
downloaded 10 KB

* installing *source* package ‘bitops’ ...
** package ‘bitops’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
ERROR: compilation failed for package ‘bitops’
* removing ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/bitops’

The downloaded source packages are in
    ‘/private/var/folders/9t/mjy2f0ds26d5ttj00_ct2rqm0000gn/T/RtmpdKR5zE/downloaded_packages’
Warning message:
In install.packages("bitops") :
  installation of package ‘bitops’ had non-zero exit status

下载安装完swirl包后,加载swirl包后提示缺少bitops

选择安装bitops包后,提示出错,求大神解决一下,谢谢!

看一下这个:xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun_青颜的天空的博客-CSDN博客

您好,我是有问必答小助手,你的问题已经有小伙伴为您解答了问题,您看下是否解决了您的问题,可以追评进行沟通哦~

如果有您比较满意的答案 / 帮您提供解决思路的答案,可以点击【采纳】按钮,给回答的小伙伴一些鼓励哦~~

ps:问答VIP仅需29元,即可享受5次/月 有问必答服务,了解详情>>>https://vip.csdn.net/askvip?utm_source=1146287632

非常感谢您使用有问必答服务,为了后续更快速的帮您解决问题,现诚邀您参与有问必答体验反馈。您的建议将会运用到我们的产品优化中,希望能得到您的支持与协助!

速戳参与调研>>>https://t.csdnimg.cn/Kf0y