首页 > 解决方案 > RStudio 错误:无法找到实用程序“包”,不是开发人员工具或 PATH

问题描述

问题描述:

我正在尝试在我在 MacOs Mojave 10.14.1 上安装的 R 工作室上安装“ggplot2”包。每次我尝试使用安装

我出现以下错误:

sh: line 1:  1549 Abort trap: 6      /Applications/Xcode.app/Contents/Developer
error: unable to find utility "package_name", not a developer tool or in PATH

我解决问题的方法:

以上方法都不适合我。

我该如何克服这个问题?!

标签: rmacospackagerstudio

解决方案


我在Ivan Mir提供的 Stackoverflow 中遇到了解决方案,基本上您需要执行以下操作:

xcode-select --print-path在您的终端中签出。

如果是/Applications/Xcode.app/Contents/Developer然后运行

sudo xcode-select --switch /Library/Developer/CommandLineTools to set xcode-select to non-Xcode Command Line Tools.

如果你没有 /Library/Developer/CommandLineTools 目录,你可以在这里为你当前的 Xcode 版本获取它们。


推荐阅读