r - RStudio 错误:无法找到实用程序“包”,不是开发人员工具或 PATH
问题描述
问题描述:
我正在尝试在我在 MacOs Mojave 10.14.1 上安装的 R 工作室上安装“ggplot2”包。每次我尝试使用安装
install.packages("ggplot2", dependencies = T)
R Studio -> 工具 -> 安装包...并输入'
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
我解决问题的方法:
- 我确保安装和更新了 Xcode
- 在 R Studio 中,我确保我能够在不使用安全 HTTPS 方法工具的情况下下载内容 -> 全局选项 -> 包 -> 未选中“使用 HTTP 安全下载方法”
以上方法都不适合我。
我该如何克服这个问题?!
解决方案
我在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 版本获取它们。
推荐阅读
- android - SharedPreferencesListener 无故停止工作
- twilio - 识别 Twilio 视频室中的电话呼叫者
- python-2.7 - 用新的字符串文本替换结束字符串文本
- react-native - 如何解决使用 AsyncStorage(已弃用)警告?使用社区(正确)库
- json.net - JsonPath SelectToken 不适用于递归结构
- sql - 查询获取同一张表中 1:N 关系的数据
- database - Oracle中VARCHAR2的默认值是多少?
- javascript - 如何检测代理函数何时用作构造函数?
- c# - 在回发时从视图状态替换动态控件
- swift - 如何将文本添加到我的 MKOverLayRenderer