我在安装R时遇到了一些困难。我发现我无法安装软件包,并认为这是由于最近安装的软件包进行了一些调整。由于我是一个新手,我认为重新安装可能会解决问题,因此我通过homebrew卸载了R和Rstudio。
重新安装后,我面临着同样的问题。以下是从控制台输出的部分内容:
install.packages("tidyverse")
/usr/local/opt/llvm/bin/clang -fopenmp -I"/usr/local/Cellar/r/3.5.1/lib/R/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c assumptions.c -o assumptions.o
In file included from assumptions.c:21:
/usr/local/Cellar/r/3.5.1/lib/R/include/Rinternals.h:39:11: fatal error: 'stdio.h' file not found
# include <stdio.h>
^~~~~~~~~
1 error generated.
搜索本网站和其他网站建议,这与缺少Xcode命令行工具有关。我已经检查过这些工具是否安装。
在终端中搜索stdio.h显示了各种子文件夹中的众多版本(tvos、iOS等)
其他丢失的文件包括:stdlib.h、assert.h和unistd.h
如果需要,我可以提供完整输出。
stdio.h
,你甚至无法编译“Hello, World!”。这很糟糕。你在使用安装了吗? - Ralf Stubner