R:无法更新软件包 clang 找不到头文件

2024-01-09

我有几个 R 包未能从源代码更新/遵守。以下是错误消息的片段;

clang++ -std=gnu++11 -I"/usr/local/Cellar/r/3.5.2_2/lib/R/include" -DNDEBUG  -I"/Volumes/Documents/Users/akihoji/Library/R/3.x/library/Rcpp/include" -I"/Volumes/Documents/Users/akihoji/Library/R/3.x/library/RcppArmadillo/include" -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/include   -fPIC  -g -O2 -c RcppExports.cpp -o RcppExports.o
    In file included from RcppExports.cpp:4:
    In file included from /Volumes/Documents/Users/akihoji/Library/R/3.x/library/RcppArmadillo/include/RcppArmadillo.h:31:
    In file included from /Volumes/Documents/Users/akihoji/Library/R/3.x/library/RcppArmadillo/include/RcppArmadilloForward.h:26:
    In file included from /Volumes/Documents/Users/akihoji/Library/R/3.x/library/Rcpp/include/RcppCommon.h:29:
    In file included from /Volumes/Documents/Users/akihoji/Library/R/3.x/library/Rcpp/include/Rcpp/r/headers.h:59:
    In file included from /Volumes/Documents/Users/akihoji/Library/R/3.x/library/Rcpp/include/Rcpp/platform/compiler.h:100:
    In file included from /usr/local/Cellar/llvm/7.0.1/include/c++/v1/cmath:305:
    /usr/local/Cellar/llvm/7.0.1/include/c++/v1/math.h:301:15: **fatal error: 'math.h' file not found**

另一个;

> ** libs clang -I"/usr/local/Cellar/r/3.5.2_2/lib/R/include" -DNDEBUG  -I"/Volumes/Documents/Users/akihoji/Library/R/3.x/library/Matrix/include"
> -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/include   -fPIC  -g -O2  -c irlb.c -o irlb.o irlb.c:19:10: fatal error: 'stdlib.h' file not found
> #include <stdlib.h>

错误消息指向几个丢失的标头,但它们都在我的

/usr/local/Cellar/llvm/7.0.1/include/c++/v1

如果您能帮助解决这个问题,我将不胜感激。

sw_vers
ProductName:    Mac OS X
ProductVersion: 10.14.3
BuildVersion:   18D4

clang -v
clang version 7.0.1 (tags/RELEASE_701/final)
Target: x86_64-apple-darwin18.2.0
Thread model: posix
InstalledDir: /usr/local/opt/llvm/bin

gcc --version
gcc (Homebrew GCC 8.2.0) 8.2.0



setting  value                       
 version  R version 3.5.2 (2018-12-20)
 os       macOS Mojave 10.14.3        
 system   x86_64, darwin17.7.0        
 ui       RStudio                     
 language (EN)                        
 collate  en_US.UTF-8                 
 ctype    en_US.UTF-8                 
 tz       America/New_York            
 date     2019-02-06 

Update;

我只记得当我在另一台 Mac 上安装 OSX Mojave 时遇到了完全相同的问题。事实证明,即使安装命令工具时,/usr/include 也不存在,特别是对于最新版本Xcode-select install.

我安装的Xcode是

pkgutil --pkg-info=com.apple.pkg.CLTools_Executables
package-id: com.apple.pkg.CLTools_Executables
version: 10.1.0.0.1.1539992718
volume: /
location: /
install-time: 1549499389
groups: com.apple.FindSystemFiles.pkg-group

此 CLT pkg 将安装 /include 在

/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include
/Library/Developer/CommandLineTools/usr/include

因此,您所要做的就是将其中一个包含文件夹复制或链接到 /usr,但为了做到这一点,您必须通过在恢复模式下激发 crstutil 来禁用系统完整性保护。

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

R:无法更新软件包 clang 找不到头文件 的相关文章

  • Mac OS X Yosemite 中的 Node.js dtrace 错误

    我在 Mac OS X 10 10 Yosemite 上尝试使用 DTrace Node js 应用程序 sudo dtrace n profile 97 execname node arg1 jstack 150 8000 count t
  • 如何使用 R 中带引号的字符值内的序列读取 CSV?

    这是一个包含两个字符列的 CSV 文件 key value a 所有字符值都用双引号引起来 并且有一个顺序 在值之一内 转义引号加分隔符 我无法通过 read csv readr 中的 read csv 或 data table 中的 fr
  • 使用 dplyr:group_by 将数据帧分成多个子集?

    有没有办法根据 group by 组使用 dplyr 将一个数据帧拆分为数据帧的子集 mtcars gt group by cyl gear gt codes 非常感谢 好吧 并不是你真的想要 但你可以这样做tidyr 即nearly一样的
  • 如何获得属于五分位数的x?

    我正在大学学习使用 R 进行计量经济学项目 所以请原谅我的笨拙 基本上 使用并给出 一个矩阵 股票价格 行 天 列 公司股票价格 另一个矩阵 市值 行 天 列 公司市值 我必须收集第三个矩阵每天观察的属于市值分布第一五分位数的股票价格 然后
  • R:将 readRDS 应用于 .Rds 文件名的列表对象

    我有几个包含数据帧对象的 Rds 文件 我想对每个文件应用一个函数并将数据帧绑定到单个数据帧中 但是 当我尝试从文件名列表中读取多个 Rds 文件时 我收到错误 FUN X i 中的错误 从连接读取时出错 readRDS 不适用于列表吗 R
  • 在 R 中绘制对数正态概率密度

    我正在尝试在 R 中生成对数正态概率密度图 其中包含 3 个不同的均值对数和标准差对数 我尝试了以下方法 但我的图表太丑了 看起来一点也不好看 x lt seq 0 10 length 100 a lt dlnorm x meanlog 0
  • 仅保留百分比的尾随零

    给出以下示例 library pander tableAbs lt Titanic 1 1 tablePct lt round prop table tableAbs 100 2 table lt cbind tableAbs tableP
  • 解析,用三点参数替换

    让我们考虑一个典型的deparse substitute R call f1 lt function u x y print deparse substitute x varU vu varX vx varY vy f1 u varU x
  • 安装 python 3 的包

    我倾向于在 Jupyter 笔记本中运行我的代码 这些代码在 python 3 中运行 我的计算机上也有 python 2 我安装了pip3所以我可以专门为 python 3 安装软件包 但这似乎不适合我 mba pip3 install
  • 比较 R 中的两个字符向量

    我有两个 ID 字符向量 我想比较这两个字符向量 特别是我对以下数字感兴趣 A和B各有多少个ID 有多少个ID在A中但不在B中 有多少个ID在B但不在A 我还想画维恩图 以下是一些可以尝试的基础知识 gt A c Dog Cat Mouse
  • fread 将空导入为 NA

    我正在尝试导入带有空白的 csv 读取为 不幸的是他们都读作 NA now 为了更好地演示问题 我还展示了如何NA NA and 都映射到同一事物 除了最底部的示例 这将妨碍简单的解决方法dt is na dt lt gt write cs
  • 如何将此“for”循环转换为向量解

    这个问题与 将嵌入其他文本的长州名称转换为两个字母的州缩写 https stackoverflow com questions 25582518 convert long state names embedded with other te
  • 为什么这些数字不相等?

    下面的代码显然是错误的 有什么问题 i lt 0 1 i lt i 0 05 i 1 0 15 if i 0 15 cat i equals 0 15 else cat i does not equal 0 15 i does not eq
  • 带 R 的多彩标题

    我想添加颜色某些词在我的图表标题中 我已经能够在这里找到一些先例 http blog revolutionanalytics com 2009 01 multicolor text in r html 具体来说 我希望用撇号括起来的文本 在
  • 如何在没有 SDK 的情况下在 Objective C 中为 S3 创建预签名 URL?

    我正在构建一个 mac 应用程序not使用 AWS iOS 开发工具包 我尝试构建的 GET 请求应遵循以下通用格式 Authorization AWS AWSAccessKeyId base64 hmac sha1 VERB n CONT
  • 如何在R中同时对三个字段进行网络分析

    如何在 R 中同时对三个字段进行网络分析 下面是示例数据以及desired output在最后一栏中 df lt data frame stringsAsFactors FALSE id 1 c ABC ABC BCD CDE DEF EF
  • Mac 应用程序商店 - 尝试让加密发挥作用。 。 。我缺少什么?

    我正在尝试使用 Alan Quartermain 的解决方案 如该问题所链接 Mac App Store 收据验证码 https stackoverflow com questions 4261348 mac app store recei
  • 如何匹配 R 中的所有匹配项?

    我有 1000 个名字的列表 说A 我还有另外 5 个名字的清单 说B 我想找出这5个名字出现在1000个号码列表中的第几行 例如 Amy 在 A 中可以出现 25 次 B 里有艾米 我想知道 Amy 出现在 A 中的哪些行 我以前使用过
  • ggplot2、R 中的单条形条形图

    我有以下数据和代码 gt ddf var1 var2 1 aa 73 2 bb 18 3 cc 9 gt gt dput ddf structure list var1 c aa bb cc var2 c 73L 18L 9L Names
  • rvm:未找到命令 MAC OX

    真的 我不知道发生了什么 对不起 如果这个问题太菜鸟了 但我找不到这个问题的解决方案 bash rvm 找不到命令 我试过这个 curl L https get rvm io https get rvm io bash s 版本最新 但我仍

随机推荐